pub struct Builder { /* private fields */ }
Expand description

A builder for AddPermissionInput.

Implementations§

The name 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.

Examples found in repository?
src/client.rs (line 1525)
1524
1525
1526
1527
        pub fn function_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.function_name(input.into());
            self
        }

The name 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.

Examples found in repository?
src/client.rs (line 1540)
1536
1537
1538
1539
1540
1541
1542
        pub fn set_function_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_function_name(input);
            self
        }

A statement identifier that differentiates the statement from others in the same policy.

Examples found in repository?
src/client.rs (line 1545)
1544
1545
1546
1547
        pub fn statement_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.statement_id(input.into());
            self
        }

A statement identifier that differentiates the statement from others in the same policy.

Examples found in repository?
src/client.rs (line 1550)
1549
1550
1551
1552
        pub fn set_statement_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_statement_id(input);
            self
        }

The action that the principal can use on the function. For example, lambda:InvokeFunction or lambda:GetFunction.

Examples found in repository?
src/client.rs (line 1555)
1554
1555
1556
1557
        pub fn action(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.action(input.into());
            self
        }

The action that the principal can use on the function. For example, lambda:InvokeFunction or lambda:GetFunction.

Examples found in repository?
src/client.rs (line 1560)
1559
1560
1561
1562
        pub fn set_action(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_action(input);
            self
        }

The Amazon Web Services service or account that invokes the function. If you specify a service, use SourceArn or SourceAccount to limit who can invoke the function through that service.

Examples found in repository?
src/client.rs (line 1565)
1564
1565
1566
1567
        pub fn principal(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.principal(input.into());
            self
        }

The Amazon Web Services service or account that invokes the function. If you specify a service, use SourceArn or SourceAccount to limit who can invoke the function through that service.

Examples found in repository?
src/client.rs (line 1570)
1569
1570
1571
1572
        pub fn set_principal(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_principal(input);
            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.

Examples found in repository?
src/client.rs (line 1576)
1575
1576
1577
1578
        pub fn source_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.source_arn(input.into());
            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.

Examples found in repository?
src/client.rs (line 1582)
1581
1582
1583
1584
        pub fn set_source_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_source_arn(input);
            self
        }

For Amazon S3, the ID of the account that owns the resource. Use this together with SourceArn to ensure that the resource is owned by the specified account. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.

Examples found in repository?
src/client.rs (line 1587)
1586
1587
1588
1589
        pub fn source_account(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.source_account(input.into());
            self
        }

For Amazon S3, the ID of the account that owns the resource. Use this together with SourceArn to ensure that the resource is owned by the specified account. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.

Examples found in repository?
src/client.rs (line 1595)
1591
1592
1593
1594
1595
1596
1597
        pub fn set_source_account(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_source_account(input);
            self
        }

For Alexa Smart Home functions, a token that must be supplied by the invoker.

Examples found in repository?
src/client.rs (line 1600)
1599
1600
1601
1602
        pub fn event_source_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.event_source_token(input.into());
            self
        }

For Alexa Smart Home functions, a token that must be supplied by the invoker.

Examples found in repository?
src/client.rs (line 1608)
1604
1605
1606
1607
1608
1609
1610
        pub fn set_event_source_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_event_source_token(input);
            self
        }

Specify a version or alias to add permissions to a published version of the function.

Examples found in repository?
src/client.rs (line 1613)
1612
1613
1614
1615
        pub fn qualifier(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.qualifier(input.into());
            self
        }

Specify a version or alias to add permissions to a published version of the function.

Examples found in repository?
src/client.rs (line 1618)
1617
1618
1619
1620
        pub fn set_qualifier(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_qualifier(input);
            self
        }

Only update the policy 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.

Examples found in repository?
src/client.rs (line 1623)
1622
1623
1624
1625
        pub fn revision_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.revision_id(input.into());
            self
        }

Only update the policy 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.

Examples found in repository?
src/client.rs (line 1628)
1627
1628
1629
1630
        pub fn set_revision_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_revision_id(input);
            self
        }

The identifier for your organization in Organizations. Use this to grant permissions to all the Amazon Web Services accounts under this organization.

Examples found in repository?
src/client.rs (line 1633)
1632
1633
1634
1635
        pub fn principal_org_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.principal_org_id(input.into());
            self
        }

The identifier for your organization in Organizations. Use this to grant permissions to all the Amazon Web Services accounts under this organization.

Examples found in repository?
src/client.rs (line 1641)
1637
1638
1639
1640
1641
1642
1643
        pub fn set_principal_org_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_principal_org_id(input);
            self
        }

The type of authentication that your function URL uses. Set to AWS_IAM if you want to restrict access to authenticated IAM 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.

Examples found in repository?
src/client.rs (line 1646)
1645
1646
1647
1648
        pub fn function_url_auth_type(mut self, input: crate::model::FunctionUrlAuthType) -> Self {
            self.inner = self.inner.function_url_auth_type(input);
            self
        }

The type of authentication that your function URL uses. Set to AWS_IAM if you want to restrict access to authenticated IAM 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.

Examples found in repository?
src/client.rs (line 1654)
1650
1651
1652
1653
1654
1655
1656
        pub fn set_function_url_auth_type(
            mut self,
            input: std::option::Option<crate::model::FunctionUrlAuthType>,
        ) -> Self {
            self.inner = self.inner.set_function_url_auth_type(input);
            self
        }

Consumes the builder and constructs a AddPermissionInput.

Examples found in repository?
src/client.rs (line 1485)
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::AddPermission,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::AddPermissionError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::AddPermissionOutput,
            aws_smithy_http::result::SdkError<crate::error::AddPermissionError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more