@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:29.727Z") public class CfnUrl extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnUrl.Builder
A fluent builder for
CfnUrl . |
static interface |
CfnUrl.CorsProperty
The [Cross-Origin Resource Sharing (CORS)](https://docs.aws.amazon.com/https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings for your function URL.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnUrl(Construct scope,
java.lang.String id,
CfnUrlProps props)
Create a new `AWS::Lambda::Url`.
|
protected |
CfnUrl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnUrl(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrFunctionArn()
The Amazon Resource Name (ARN) of the function.
|
java.lang.String |
getAttrFunctionUrl()
The HTTP URL endpoint for your function.
|
java.lang.String |
getAuthType()
The type of authentication that your function URL uses.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getCors()
The [Cross-Origin Resource Sharing (CORS)](https://docs.aws.amazon.com/https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings for your function URL.
|
java.lang.String |
getInvokeMode()
`AWS::Lambda::Url.InvokeMode`.
|
java.lang.String |
getQualifier()
The alias name.
|
java.lang.String |
getTargetFunctionArn()
The name of the Lambda function.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAuthType(java.lang.String value)
The type of authentication that your function URL uses.
|
void |
setCors(CfnUrl.CorsProperty value)
The [Cross-Origin Resource Sharing (CORS)](https://docs.aws.amazon.com/https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings for your function URL.
|
void |
setCors(IResolvable value)
The [Cross-Origin Resource Sharing (CORS)](https://docs.aws.amazon.com/https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings for your function URL.
|
void |
setInvokeMode(java.lang.String value)
`AWS::Lambda::Url.InvokeMode`.
|
void |
setQualifier(java.lang.String value)
The alias name.
|
void |
setTargetFunctionArn(java.lang.String value)
The name of the Lambda function.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnUrl(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnUrl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnUrl(Construct scope, java.lang.String id, CfnUrlProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrFunctionArn()
public java.lang.String getAttrFunctionUrl()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getAuthType()
Set to AWS_IAM
if you want to restrict access to authenticated 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 .
public void setAuthType(java.lang.String value)
Set to AWS_IAM
if you want to restrict access to authenticated 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 .
public java.lang.String getTargetFunctionArn()
Name formats - Function name - my-function
.
arn:aws:lambda:us-west-2:123456789012:function:my-function
.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.
public void setTargetFunctionArn(java.lang.String value)
Name formats - Function name - my-function
.
arn:aws:lambda:us-west-2:123456789012:function:my-function
.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.
public java.lang.Object getCors()
public void setCors(IResolvable value)
public void setCors(CfnUrl.CorsProperty value)
public java.lang.String getInvokeMode()
public void setInvokeMode(java.lang.String value)
public java.lang.String getQualifier()
public void setQualifier(java.lang.String value)