@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.416Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnUrl(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrFunctionArn()
The Amazon Resource Name (ARN) of the function.
|
String |
getAttrFunctionUrl()
The HTTP URL endpoint for your function.
|
String |
getAuthType()
The type of authentication that your function URL uses.
|
protected Map<String,Object> |
getCfnProperties() |
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.
|
String |
getInvokeMode()
`AWS::Lambda::Url.InvokeMode`.
|
String |
getQualifier()
The alias name.
|
String |
getTargetFunctionArn()
The name of the Lambda function.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAuthType(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(String value)
`AWS::Lambda::Url.InvokeMode`.
|
void |
setQualifier(String value)
The alias name.
|
void |
setTargetFunctionArn(String value)
The name of the Lambda function.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnUrl(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnUrl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnUrl(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrFunctionArn()
@Stability(value=Stable) @NotNull public String getAttrFunctionUrl()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getAuthType()
Set to AWS_IAM if you want to restrict access to authenticated IAM 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 .
@Stability(value=Stable)
public void setAuthType(@NotNull
String value)
Set to AWS_IAM if you want to restrict access to authenticated IAM 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 .
@Stability(value=Stable) @NotNull public 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.
@Stability(value=Stable)
public void setTargetFunctionArn(@NotNull
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.
@Stability(value=Stable) @Nullable public Object getCors()
@Stability(value=Stable)
public void setCors(@Nullable
CfnUrl.CorsProperty value)
@Stability(value=Stable)
public void setCors(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getInvokeMode()
@Stability(value=Stable)
public void setInvokeMode(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getQualifier()
@Stability(value=Stable)
public void setQualifier(@Nullable
String value)
Copyright © 2022. All rights reserved.