Class CfnUrl
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Lambda::Url.
The AWS::Lambda::Url resource creates a function URL with the specified configuration parameters. A function URL is a dedicated HTTP(S) endpoint that you can use to invoke your function.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;
CfnUrl cfnUrl = CfnUrl.Builder.create(this, "MyCfnUrl")
.authType("authType")
.targetFunctionArn("targetFunctionArn")
// the properties below are optional
.cors(CorsProperty.builder()
.allowCredentials(false)
.allowHeaders(List.of("allowHeaders"))
.allowMethods(List.of("allowMethods"))
.allowOrigins(List.of("allowOrigins"))
.exposeHeaders(List.of("exposeHeaders"))
.maxAge(123)
.build())
.invokeMode("invokeMode")
.qualifier("qualifier")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnUrl.static interfaceThe Cross-Origin Resource Sharing (CORS) settings for your function URL.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the function.The HTTP URL endpoint for your function.The type of authentication that your function URL uses.getCors()The Cross-Origin Resource Sharing (CORS) settings for your function URL.Use one of the following options:.The alias name.The name of the Lambda function.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAuthType(String value) The type of authentication that your function URL uses.voidsetCors(IResolvable value) The Cross-Origin Resource Sharing (CORS) settings for your function URL.voidsetCors(CfnUrl.CorsProperty value) The Cross-Origin Resource Sharing (CORS) settings for your function URL.voidsetInvokeMode(String value) Use one of the following options:.voidsetQualifier(String value) The alias name.voidsetTargetFunctionArn(String value) The name of the Lambda function.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnUrl
protected CfnUrl(software.amazon.jsii.JsiiObjectRef objRef) -
CfnUrl
protected CfnUrl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnUrl
@Stability(Stable) public CfnUrl(@NotNull Construct scope, @NotNull String id, @NotNull CfnUrlProps props) Create a newAWS::Lambda::Url.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrFunctionArn
The Amazon Resource Name (ARN) of the function. -
getAttrFunctionUrl
The HTTP URL endpoint for your function. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getAuthType
The type of authentication that your function URL uses.Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs . -
setAuthType
The type of authentication that your function URL uses.Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs . -
getTargetFunctionArn
The name of the Lambda function.Name formats - Function name -
my-function.- Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function. - Partial ARN -
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
- Function ARN -
-
setTargetFunctionArn
The name of the Lambda function.Name formats - Function name -
my-function.- Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function. - Partial ARN -
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
- Function ARN -
-
getCors
The Cross-Origin Resource Sharing (CORS) settings for your function URL. -
setCors
The Cross-Origin Resource Sharing (CORS) settings for your function URL. -
setCors
The Cross-Origin Resource Sharing (CORS) settings for your function URL. -
getInvokeMode
Use one of the following options:.BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 20 MB, however, you can request a quota increase .
-
setInvokeMode
Use one of the following options:.BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB.RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 20 MB, however, you can request a quota increase .
-
getQualifier
The alias name. -
setQualifier
The alias name.
-