WebFunctionEndpointGrants Facade Added in v2.276.0
Collection of grant methods for a WebFunction endpoint.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
import { aws_lambda as interfaces_lambda } from 'aws-cdk-lib/interfaces';
declare const webFunctionEndpointRef: interfaces_lambda.IWebFunctionEndpointRef;
const webFunctionEndpointGrants = lambda.WebFunctionEndpointGrants.fromWebFunctionEndpoint(webFunctionEndpointRef);
Methods
fromWebFunctionEndpoint(endpoint: IWebFunctionEndpointRef): WebFunctionEndpointGrants // chainable@staticmethod def from_web_function_endpoint(endpoint: IWebFunctionEndpointRef) -> WebFunctionEndpointGrantspublic static WebFunctionEndpointGrants fromWebFunctionEndpoint(IWebFunctionEndpointRef endpoint)public static WebFunctionEndpointGrants FromWebFunctionEndpoint(IWebFunctionEndpointRef endpoint)func FromWebFunctionEndpoint(Endpoint IWebFunctionEndpointRef) WebFunctionEndpointGrantsstatic#Creates grants for a WebFunction endpoint.
invoke(grantee: IGrantable): Grantdef invoke(self, grantee: IGrantable) -> Grantpublic Grant invoke(IGrantable grantee)public Grant Invoke(IGrantable grantee)func Invoke(Grantee IGrantable) Grant#Grants permission to invoke the endpoint over HTTP.
notes
Only meaningful for an endpoint with WebFunctionAuthType.IAM_AUTH; requests to it must be signed by the grantee.
A role or user in this account gets the permission in its own policy. Any other grantee, such as a service principal or another account, gets a statement in the resource-based policy of the WebFunction the endpoint serves, which requires that function to be defined in this app.