Class CfnUrl
A CloudFormation AWS::Lambda::Url
.
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.AWS.Lambda.dll
Syntax (csharp)
public class CfnUrl : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnUrl
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::Lambda::Url
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-url.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;
var cfnUrl = new CfnUrl(this, "MyCfnUrl", new CfnUrlProps {
AuthType = "authType",
TargetFunctionArn = "targetFunctionArn",
// the properties below are optional
Cors = new CorsProperty {
AllowCredentials = false,
AllowHeaders = new [] { "allowHeaders" },
AllowMethods = new [] { "allowMethods" },
AllowOrigins = new [] { "allowOrigins" },
ExposeHeaders = new [] { "exposeHeaders" },
MaxAge = 123
},
InvokeMode = "invokeMode",
Qualifier = "qualifier"
});
Synopsis
Constructors
CfnUrl(Construct, String, ICfnUrlProps) | Create a new |
CfnUrl(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnUrl(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrFunctionArn | The Amazon Resource Name (ARN) of the function. |
AttrFunctionUrl | The HTTP URL endpoint for your function. |
AuthType | The type of authentication that your function URL uses. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Cors | The Cross-Origin Resource Sharing (CORS) settings for your function URL. |
InvokeMode | Use one of the following options:. |
Qualifier | The alias name. |
TargetFunctionArn | The name of the Lambda function. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnUrl(Construct, String, ICfnUrlProps)
Create a new AWS::Lambda::Url
.
public CfnUrl(Construct scope, string id, ICfnUrlProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnUrlProps
- resource properties.
CfnUrl(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnUrl(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnUrl(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnUrl(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrFunctionArn
The Amazon Resource Name (ARN) of the function.
public virtual string AttrFunctionArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: FunctionArn
AttrFunctionUrl
The HTTP URL endpoint for your function.
public virtual string AttrFunctionUrl { get; }
Property Value
System.String
Remarks
CloudformationAttribute: FunctionUrl
AuthType
The type of authentication that your function URL uses.
public virtual string AuthType { get; set; }
Property Value
System.String
Remarks
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 .
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Cors
The Cross-Origin Resource Sharing (CORS) settings for your function URL.
public virtual object Cors { get; set; }
Property Value
System.Object
Remarks
InvokeMode
Use one of the following options:.
public virtual string InvokeMode { get; set; }
Property Value
System.String
Remarks
Qualifier
The alias name.
public virtual string Qualifier { get; set; }
Property Value
System.String
Remarks
TargetFunctionArn
The name of the Lambda function.
public virtual string TargetFunctionArn { get; set; }
Property Value
System.String
Remarks
Name formats - Function name - 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.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>