Skip to main content

urls

Creates, updates, deletes or gets an url resource or lists urls in a region

Overview

Nameurls
TypeResource
DescriptionResource Type definition for AWS::Lambda::Url
Idawscc.lambda.urls

Fields

NameDatatypeDescription
target_function_arnstringThe Amazon Resource Name (ARN) of the function associated with the Function URL.
qualifierstringThe alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.
auth_typestringCan be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.
invoke_modestringThe 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.
function_arnstringThe full Amazon Resource Name (ARN) of the function associated with the Function URL.
function_urlstringThe generated url for this resource.
corsobject
regionstringAWS region.

For more information, see AWS::Lambda::Url.

Methods

NameResourceAccessible byRequired Params
create_resourceurlsINSERTTargetFunctionArn, AuthType, region
delete_resourceurlsDELETEIdentifier, region
update_resourceurlsUPDATEIdentifier, PatchDocument, region
list_resourcesurls_list_onlySELECTregion
get_resourceurlsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual url.

SELECT
region,
target_function_arn,
qualifier,
auth_type,
invoke_mode,
function_arn,
function_url,
cors
FROM awscc.lambda.urls
WHERE
region = '{{ region }}' AND
Identifier = '{{ function_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new url resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.lambda.urls (
TargetFunctionArn,
AuthType,
region
)
SELECT
'{{ target_function_arn }}',
'{{ auth_type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a url resource, using stack-deploy.

/*+ update */
UPDATE awscc.lambda.urls
SET PatchDocument = string('{{ {
"AuthType": auth_type,
"InvokeMode": invoke_mode,
"Cors": cors
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ function_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.lambda.urls
WHERE
Identifier = '{{ function_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the urls resource, the following permissions are required:

lambda:CreateFunctionUrlConfig