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 class
A fluent builder forCfnUrl
.static interface
The Cross-Origin Resource Sharing (CORS) settings for your function URL.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The 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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAuthType
(String value) The type of authentication that your function URL uses.void
setCors
(IResolvable value) The Cross-Origin Resource Sharing (CORS) settings for your function URL.void
setCors
(CfnUrl.CorsProperty value) The Cross-Origin Resource Sharing (CORS) settings for your function URL.void
setInvokeMode
(String value) Use one of the following options:.void
setQualifier
(String value) The alias name.void
setTargetFunctionArn
(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, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in 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:
getCfnProperties
in classCfnResource
-
getAuthType
The type of authentication that your function URL uses.Set to
AWS_IAM
if you want to restrict access to authenticated users only. Set toNONE
if 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_IAM
if you want to restrict access to authenticated users only. Set toNONE
if 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 theInvoke
API 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 theInvokeWithResponseStream
API 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 theInvoke
API 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 theInvokeWithResponseStream
API operation. The maximum response payload size is 20 MB, however, you can request a quota increase .
-
getQualifier
The alias name. -
setQualifier
The alias name.
-