Resource Type definition for AWS::Lambda::Url
Create Url Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
@overload
def Url(resource_name: str,
args: UrlArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Url(resource_name: str,
opts: Optional[ResourceOptions] = None,
auth_type: Optional[UrlAuthType] = None,
target_function_arn: Optional[str] = None,
cors: Optional[UrlCorsArgs] = None,
invoke_mode: Optional[UrlInvokeMode] = None,
qualifier: Optional[str] = None)
public Url(String name, UrlArgs args)
public Url(String name, UrlArgs args, CustomResourceOptions options)
type: aws-native:lambda:Url
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws-native_lambda_url" "name" {
# resource properties
}
Parameters
- name
string
- The unique name of the resource.
- args
UrlArgs
- The arguments to resource properties.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resource.
- args
UrlArgs
- The arguments to resource properties.
- opts
ResourceOptions
- Bag of options to control resource's behavior.
- ctx
Context
- Context object for the current deployment.
- name
string
- The unique name of the resource.
- args
UrlArgs
- The arguments to resource properties.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resource.
- args
UrlArgs
- The arguments to resource properties.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resource.
- args
UrlArgs
- The arguments to resource properties.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Url Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Url resource accepts the following input properties:
- AuthType
UrlAuthType
- Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.
- TargetFunctionArn
string
- The Amazon Resource Name (ARN) of the function associated with the Function URL.
- Cors
UrlCorsArgs
- The Cross-Origin Resource Sharing (CORS) settings for your function URL.
- InvokeMode
UrlInvokeMode
- The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED.
- Qualifier
string
- The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.
- auth_type
"AWS_IAM" | "NONE"
- Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.
- target_function_arn
string
- The Amazon Resource Name (ARN) of the function associated with the Function URL.
- cors
object
- The Cross-Origin Resource Sharing (CORS) settings for your function URL.
- invoke_mode
"BUFFERED" | "RESPONSE_STREAM"
- The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED.
- qualifier
string
- The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.
- authType
UrlAuthType
- Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.
- targetFunctionArn
String
- The Amazon Resource Name (ARN) of the function associated with the Function URL.
- cors
UrlCors
- The Cross-Origin Resource Sharing (CORS) settings for your function URL.
- invokeMode
UrlInvokeMode
- The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED.
- qualifier
String
- The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.
- authType
UrlAuthType
- Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.
- targetFunctionArn
string
- The Amazon Resource Name (ARN) of the function associated with the Function URL.
- cors
UrlCors
- The Cross-Origin Resource Sharing (CORS) settings for your function URL.
- invokeMode
UrlInvokeMode
- The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED.
- qualifier
string
- The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.
- auth_type
UrlAuthType
- Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.
- target_function_arn
str
- The Amazon Resource Name (ARN) of the function associated with the Function URL.
- cors
UrlCorsArgs
- The Cross-Origin Resource Sharing (CORS) settings for your function URL.
- invoke_mode
UrlInvokeMode
- The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED.
- qualifier
str
- The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.
- authType
"AWS_IAM" | "NONE"
- Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.
- targetFunctionArn
String
- The Amazon Resource Name (ARN) of the function associated with the Function URL.
- cors
Property Map
- The Cross-Origin Resource Sharing (CORS) settings for your function URL.
- invokeMode
"BUFFERED" | "RESPONSE_STREAM"
- The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED.
- qualifier
String
- The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.
Outputs
All input properties are implicitly available as output properties. Additionally, the Url resource produces the following output properties:
- FunctionArn
string
- The full Amazon Resource Name (ARN) of the function associated with the Function URL.
- FunctionUrl
string
- The generated url for this resource.
- Id
string
- The provider-assigned unique ID for this managed resource.
- FunctionArn
string
- The full Amazon Resource Name (ARN) of the function associated with the Function URL.
- FunctionUrl
string
- The generated url for this resource.
- Id
string
- The provider-assigned unique ID for this managed resource.
- function_arn
string
- The full Amazon Resource Name (ARN) of the function associated with the Function URL.
- function_url
string
- The generated url for this resource.
- id
string
- The provider-assigned unique ID for this managed resource.
- functionArn
String
- The full Amazon Resource Name (ARN) of the function associated with the Function URL.
- functionUrl
String
- The generated url for this resource.
- id
String
- The provider-assigned unique ID for this managed resource.
- functionArn
string
- The full Amazon Resource Name (ARN) of the function associated with the Function URL.
- functionUrl
string
- The generated url for this resource.
- id
string
- The provider-assigned unique ID for this managed resource.
- function_arn
str
- The full Amazon Resource Name (ARN) of the function associated with the Function URL.
- function_url
str
- The generated url for this resource.
- id
str
- The provider-assigned unique ID for this managed resource.
- functionArn
String
- The full Amazon Resource Name (ARN) of the function associated with the Function URL.
- functionUrl
String
- The generated url for this resource.
- id
String
- The provider-assigned unique ID for this managed resource.
Look up Existing Url Resource
Get an existing Url resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static Url get(String name, Output<String> id, CustomResourceOptions options)
resources: existingUrl: type: aws-native:lambda:Url get: id: ${id}
import {
to = aws-native_lambda_url.example
id = "${id}"
}
- name
string
- The unique name of the resulting resource.
- id
Input<ID>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resulting resource.
- id
str
- The unique provider ID of the resource to look up.
- opts
ResourceOptions
- Bag of options to control resource's behavior.
- ctx
Context
- Context object for the current deployment.
- name
string
- The unique name of the resulting resource.
- id
IDInput
- The unique provider ID of the resource to look up.
- state
UrlState
- Pass nil. This resource has no state arguments.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resulting resource.
- id
Input<string>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resulting resource.
- id
Output<String>
- The unique provider ID of the resource to look up.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
UrlAllowMethodsItem
| Name | Value |
|---|
| Get | GET |
| Put | PUT |
| Head | HEAD |
| Post | POST |
| Patch | PATCH |
| Delete | DELETE |
| Asterisk | * |
| Name | Value |
|---|
| UrlAllowMethodsItemGet | GET |
| UrlAllowMethodsItemPut | PUT |
| UrlAllowMethodsItemHead | HEAD |
| UrlAllowMethodsItemPost | POST |
| UrlAllowMethodsItemPatch | PATCH |
| UrlAllowMethodsItemDelete | DELETE |
| UrlAllowMethodsItemAsterisk | * |
| Value |
|---|
GET |
PUT |
HEAD |
POST |
PATCH |
DELETE |
* |
| Name | Value |
|---|
| Get | GET |
| Put | PUT |
| Head | HEAD |
| Post | POST |
| Patch | PATCH |
| Delete | DELETE |
| Asterisk | * |
| Name | Value |
|---|
| Get | GET |
| Put | PUT |
| Head | HEAD |
| Post | POST |
| Patch | PATCH |
| Delete | DELETE |
| Asterisk | * |
| Name | Value |
|---|
| GET | GET |
| PUT | PUT |
| HEAD | HEAD |
| POST | POST |
| PATCH | PATCH |
| DELETE | DELETE |
| ASTERISK | * |
| Value |
|---|
GET |
PUT |
HEAD |
POST |
PATCH |
DELETE |
* |
UrlAuthType
Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.
| Name | Value |
|---|
| AwsIam | AWS_IAM |
| None | NONE |
| Name | Value |
|---|
| UrlAuthTypeAwsIam | AWS_IAM |
| UrlAuthTypeNone | NONE |
| Name | Value |
|---|
| AwsIam | AWS_IAM |
| None | NONE |
| Name | Value |
|---|
| AwsIam | AWS_IAM |
| None | NONE |
| Name | Value |
|---|
| AWS_IAM | AWS_IAM |
| NONE | NONE |
UrlCors, UrlCorsArgs
- AllowCredentials
bool
- Specifies whether credentials are included in the CORS request.
-
List<string>
- Represents a collection of allowed headers.
- AllowMethods
List<Pulumi.AwsNative.Lambda.UrlAllowMethodsItem>
- Represents a collection of allowed HTTP methods.
- AllowOrigins
List<string>
- Represents a collection of allowed origins.
-
List<string>
- Represents a collection of exposed headers.
- MaxAge
int
- The maximum amount of time, in seconds, that browsers can cache results of a preflight request. By default, this is set to
0 , which means the browser will not cache results.
- AllowCredentials
bool
- Specifies whether credentials are included in the CORS request.
-
[]string
- Represents a collection of allowed headers.
- AllowMethods
[]UrlAllowMethodsItem
- Represents a collection of allowed HTTP methods.
- AllowOrigins
[]string
- Represents a collection of allowed origins.
-
[]string
- Represents a collection of exposed headers.
- MaxAge
int
- The maximum amount of time, in seconds, that browsers can cache results of a preflight request. By default, this is set to
0 , which means the browser will not cache results.
- allow_credentials
bool
- Specifies whether credentials are included in the CORS request.
-
list(string)
- Represents a collection of allowed headers.
- allow_methods
list("GET" | "PUT" | "HEAD" | "POST" | "PATCH" | "DELETE" | "*")
- Represents a collection of allowed HTTP methods.
- allow_origins
list(string)
- Represents a collection of allowed origins.
-
list(string)
- Represents a collection of exposed headers.
- max_age
number
- The maximum amount of time, in seconds, that browsers can cache results of a preflight request. By default, this is set to
0 , which means the browser will not cache results.
- allowCredentials
Boolean
- Specifies whether credentials are included in the CORS request.
-
List<String>
- Represents a collection of allowed headers.
- allowMethods
List<UrlAllowMethodsItem>
- Represents a collection of allowed HTTP methods.
- allowOrigins
List<String>
- Represents a collection of allowed origins.
-
List<String>
- Represents a collection of exposed headers.
- maxAge
Integer
- The maximum amount of time, in seconds, that browsers can cache results of a preflight request. By default, this is set to
0 , which means the browser will not cache results.
- allowCredentials
boolean
- Specifies whether credentials are included in the CORS request.
-
string[]
- Represents a collection of allowed headers.
- allowMethods
UrlAllowMethodsItem[]
- Represents a collection of allowed HTTP methods.
- allowOrigins
string[]
- Represents a collection of allowed origins.
-
string[]
- Represents a collection of exposed headers.
- maxAge
number
- The maximum amount of time, in seconds, that browsers can cache results of a preflight request. By default, this is set to
0 , which means the browser will not cache results.
- allow_credentials
bool
- Specifies whether credentials are included in the CORS request.
-
Sequence[str]
- Represents a collection of allowed headers.
- allow_methods
Sequence[UrlAllowMethodsItem]
- Represents a collection of allowed HTTP methods.
- allow_origins
Sequence[str]
- Represents a collection of allowed origins.
-
Sequence[str]
- Represents a collection of exposed headers.
- max_age
int
- The maximum amount of time, in seconds, that browsers can cache results of a preflight request. By default, this is set to
0 , which means the browser will not cache results.
- allowCredentials
Boolean
- Specifies whether credentials are included in the CORS request.
-
List<String>
- Represents a collection of allowed headers.
- allowMethods
List<"GET" | "PUT" | "HEAD" | "POST" | "PATCH" | "DELETE" | "*">
- Represents a collection of allowed HTTP methods.
- allowOrigins
List<String>
- Represents a collection of allowed origins.
-
List<String>
- Represents a collection of exposed headers.
- maxAge
Number
- The maximum amount of time, in seconds, that browsers can cache results of a preflight request. By default, this is set to
0 , which means the browser will not cache results.
UrlInvokeMode
The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED.
| Name | Value |
|---|
| Buffered | BUFFERED |
| ResponseStream | RESPONSE_STREAM |
| Name | Value |
|---|
| UrlInvokeModeBuffered | BUFFERED |
| UrlInvokeModeResponseStream | RESPONSE_STREAM |
| Value |
|---|
BUFFERED |
RESPONSE_STREAM |
| Name | Value |
|---|
| Buffered | BUFFERED |
| ResponseStream | RESPONSE_STREAM |
| Name | Value |
|---|
| Buffered | BUFFERED |
| ResponseStream | RESPONSE_STREAM |
| Name | Value |
|---|
| BUFFERED | BUFFERED |
| RESPONSE_STREAM | RESPONSE_STREAM |
| Value |
|---|
BUFFERED |
RESPONSE_STREAM |
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0