pub struct PermissionBuilder { /* private fields */ }Expand description
Builder for Lambda function permissions.
Creates permission resources that allow other AWS services to invoke a Lambda function. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html
Implementations§
Source§impl PermissionBuilder
impl PermissionBuilder
Sourcepub fn new<R>(
id: &str,
action: LambdaPermissionAction,
function_name: Value,
principal: R,
) -> PermissionBuilder
pub fn new<R>( id: &str, action: LambdaPermissionAction, function_name: Value, principal: R, ) -> PermissionBuilder
Creates a new permission builder for a Lambda function.
§Arguments
id- Unique identifier for the permission resourceaction- Lambda action to allow (e.g., “lambda:InvokeFunction”)function_name- Reference to the Lambda functionprincipal- AWS service or account that will be granted permission
pub fn source_arn(self, arn: Value) -> PermissionBuilder
pub fn current_account(self) -> PermissionBuilder
pub fn build(self, stack_builder: &mut StackBuilder) -> PermissionRef
Auto Trait Implementations§
impl Freeze for PermissionBuilder
impl RefUnwindSafe for PermissionBuilder
impl Send for PermissionBuilder
impl Sync for PermissionBuilder
impl Unpin for PermissionBuilder
impl UnwindSafe for PermissionBuilder
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.