#[non_exhaustive]pub struct AddPermissionInputBuilder { /* private fields */ }
Expand description
A builder for AddPermissionInput
.
Implementations§
Source§impl AddPermissionInputBuilder
impl AddPermissionInputBuilder
Sourcepub fn function_name(self, input: impl Into<String>) -> Self
pub fn function_name(self, input: impl Into<String>) -> Self
The name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function
(name-only),my-function:v1
(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN –
123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
This field is required.Sourcepub fn set_function_name(self, input: Option<String>) -> Self
pub fn set_function_name(self, input: Option<String>) -> Self
The name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function
(name-only),my-function:v1
(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN –
123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Sourcepub fn get_function_name(&self) -> &Option<String>
pub fn get_function_name(&self) -> &Option<String>
The name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function
(name-only),my-function:v1
(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN –
123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Sourcepub fn statement_id(self, input: impl Into<String>) -> Self
pub fn statement_id(self, input: impl Into<String>) -> Self
A statement identifier that differentiates the statement from others in the same policy.
This field is required.Sourcepub fn set_statement_id(self, input: Option<String>) -> Self
pub fn set_statement_id(self, input: Option<String>) -> Self
A statement identifier that differentiates the statement from others in the same policy.
Sourcepub fn get_statement_id(&self) -> &Option<String>
pub fn get_statement_id(&self) -> &Option<String>
A statement identifier that differentiates the statement from others in the same policy.
Sourcepub fn action(self, input: impl Into<String>) -> Self
pub fn action(self, input: impl Into<String>) -> Self
The action that the principal can use on the function. For example, lambda:InvokeFunction
or lambda:GetFunction
.
Sourcepub fn set_action(self, input: Option<String>) -> Self
pub fn set_action(self, input: Option<String>) -> Self
The action that the principal can use on the function. For example, lambda:InvokeFunction
or lambda:GetFunction
.
Sourcepub fn get_action(&self) -> &Option<String>
pub fn get_action(&self) -> &Option<String>
The action that the principal can use on the function. For example, lambda:InvokeFunction
or lambda:GetFunction
.
Sourcepub fn principal(self, input: impl Into<String>) -> Self
pub fn principal(self, input: impl Into<String>) -> Self
The Amazon Web Services service, Amazon Web Services account, IAM user, or IAM role that invokes the function. If you specify a service, use SourceArn
or SourceAccount
to limit who can invoke the function through that service.
Sourcepub fn set_principal(self, input: Option<String>) -> Self
pub fn set_principal(self, input: Option<String>) -> Self
The Amazon Web Services service, Amazon Web Services account, IAM user, or IAM role that invokes the function. If you specify a service, use SourceArn
or SourceAccount
to limit who can invoke the function through that service.
Sourcepub fn get_principal(&self) -> &Option<String>
pub fn get_principal(&self) -> &Option<String>
The Amazon Web Services service, Amazon Web Services account, IAM user, or IAM role that invokes the function. If you specify a service, use SourceArn
or SourceAccount
to limit who can invoke the function through that service.
Sourcepub fn source_arn(self, input: impl Into<String>) -> Self
pub fn source_arn(self, input: impl Into<String>) -> Self
For Amazon Web Services services, the ARN of the Amazon Web Services resource that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic.
Note that Lambda configures the comparison using the StringLike
operator.
Sourcepub fn set_source_arn(self, input: Option<String>) -> Self
pub fn set_source_arn(self, input: Option<String>) -> Self
For Amazon Web Services services, the ARN of the Amazon Web Services resource that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic.
Note that Lambda configures the comparison using the StringLike
operator.
Sourcepub fn get_source_arn(&self) -> &Option<String>
pub fn get_source_arn(&self) -> &Option<String>
For Amazon Web Services services, the ARN of the Amazon Web Services resource that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic.
Note that Lambda configures the comparison using the StringLike
operator.
Sourcepub fn source_account(self, input: impl Into<String>) -> Self
pub fn source_account(self, input: impl Into<String>) -> Self
For Amazon Web Services service, the ID of the Amazon Web Services account that owns the resource. Use this together with SourceArn
to ensure that the specified account owns the resource. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.
Sourcepub fn set_source_account(self, input: Option<String>) -> Self
pub fn set_source_account(self, input: Option<String>) -> Self
For Amazon Web Services service, the ID of the Amazon Web Services account that owns the resource. Use this together with SourceArn
to ensure that the specified account owns the resource. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.
Sourcepub fn get_source_account(&self) -> &Option<String>
pub fn get_source_account(&self) -> &Option<String>
For Amazon Web Services service, the ID of the Amazon Web Services account that owns the resource. Use this together with SourceArn
to ensure that the specified account owns the resource. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.
Sourcepub fn event_source_token(self, input: impl Into<String>) -> Self
pub fn event_source_token(self, input: impl Into<String>) -> Self
For Alexa Smart Home functions, a token that the invoker must supply.
Sourcepub fn set_event_source_token(self, input: Option<String>) -> Self
pub fn set_event_source_token(self, input: Option<String>) -> Self
For Alexa Smart Home functions, a token that the invoker must supply.
Sourcepub fn get_event_source_token(&self) -> &Option<String>
pub fn get_event_source_token(&self) -> &Option<String>
For Alexa Smart Home functions, a token that the invoker must supply.
Sourcepub fn qualifier(self, input: impl Into<String>) -> Self
pub fn qualifier(self, input: impl Into<String>) -> Self
Specify a version or alias to add permissions to a published version of the function.
Sourcepub fn set_qualifier(self, input: Option<String>) -> Self
pub fn set_qualifier(self, input: Option<String>) -> Self
Specify a version or alias to add permissions to a published version of the function.
Sourcepub fn get_qualifier(&self) -> &Option<String>
pub fn get_qualifier(&self) -> &Option<String>
Specify a version or alias to add permissions to a published version of the function.
Sourcepub fn revision_id(self, input: impl Into<String>) -> Self
pub fn revision_id(self, input: impl Into<String>) -> Self
Update the policy only if the revision ID matches the ID that's specified. Use this option to avoid modifying a policy that has changed since you last read it.
Sourcepub fn set_revision_id(self, input: Option<String>) -> Self
pub fn set_revision_id(self, input: Option<String>) -> Self
Update the policy only if the revision ID matches the ID that's specified. Use this option to avoid modifying a policy that has changed since you last read it.
Sourcepub fn get_revision_id(&self) -> &Option<String>
pub fn get_revision_id(&self) -> &Option<String>
Update the policy only if the revision ID matches the ID that's specified. Use this option to avoid modifying a policy that has changed since you last read it.
Sourcepub fn principal_org_id(self, input: impl Into<String>) -> Self
pub fn principal_org_id(self, input: impl Into<String>) -> Self
The identifier for your organization in Organizations. Use this to grant permissions to all the Amazon Web Services accounts under this organization.
Sourcepub fn set_principal_org_id(self, input: Option<String>) -> Self
pub fn set_principal_org_id(self, input: Option<String>) -> Self
The identifier for your organization in Organizations. Use this to grant permissions to all the Amazon Web Services accounts under this organization.
Sourcepub fn get_principal_org_id(&self) -> &Option<String>
pub fn get_principal_org_id(&self) -> &Option<String>
The identifier for your organization in Organizations. Use this to grant permissions to all the Amazon Web Services accounts under this organization.
Sourcepub fn function_url_auth_type(self, input: FunctionUrlAuthType) -> Self
pub fn function_url_auth_type(self, input: FunctionUrlAuthType) -> Self
The type of authentication that your function URL uses. Set to AWS_IAM
if you want to restrict access to authenticated users only. Set to NONE
if you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.
Sourcepub fn set_function_url_auth_type(
self,
input: Option<FunctionUrlAuthType>,
) -> Self
pub fn set_function_url_auth_type( self, input: Option<FunctionUrlAuthType>, ) -> Self
The type of authentication that your function URL uses. Set to AWS_IAM
if you want to restrict access to authenticated users only. Set to NONE
if you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.
Sourcepub fn get_function_url_auth_type(&self) -> &Option<FunctionUrlAuthType>
pub fn get_function_url_auth_type(&self) -> &Option<FunctionUrlAuthType>
The type of authentication that your function URL uses. Set to AWS_IAM
if you want to restrict access to authenticated users only. Set to NONE
if you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.
Sourcepub fn build(self) -> Result<AddPermissionInput, BuildError>
pub fn build(self) -> Result<AddPermissionInput, BuildError>
Consumes the builder and constructs a AddPermissionInput
.
Source§impl AddPermissionInputBuilder
impl AddPermissionInputBuilder
Sourcepub async fn send_with(
self,
client: &Client,
) -> Result<AddPermissionOutput, SdkError<AddPermissionError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<AddPermissionOutput, SdkError<AddPermissionError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
Source§impl Clone for AddPermissionInputBuilder
impl Clone for AddPermissionInputBuilder
Source§fn clone(&self) -> AddPermissionInputBuilder
fn clone(&self) -> AddPermissionInputBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AddPermissionInputBuilder
impl Debug for AddPermissionInputBuilder
Source§impl Default for AddPermissionInputBuilder
impl Default for AddPermissionInputBuilder
Source§fn default() -> AddPermissionInputBuilder
fn default() -> AddPermissionInputBuilder
impl StructuralPartialEq for AddPermissionInputBuilder
Auto Trait Implementations§
impl Freeze for AddPermissionInputBuilder
impl RefUnwindSafe for AddPermissionInputBuilder
impl Send for AddPermissionInputBuilder
impl Sync for AddPermissionInputBuilder
impl Unpin for AddPermissionInputBuilder
impl UnwindSafe for AddPermissionInputBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);