Skip to main content

resources

Creates, updates, deletes, gets or lists a resources resource.

Overview

Nameresources
TypeResource
Idaws.resiliencehubv2.resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
input_sourceobjectThe input source that discovered the resource.
resourceobjectThe resource details.
resource_identifierstringThe identifier of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_resourcesselectserviceArn, regionserviceFunctionId, awsRegion, resourceTypes, billable, maxResults, nextTokenList resources.
create_service_function_resourcesinsertregion, serviceArn, serviceFunctionId, resourcesAssociates resources with a service function.
delete_service_function_resourcesdeleteregionRemoves resources from a service function.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
serviceArnstring
awsRegionstringFilter resources by AWS Region.
billablebooleanSpecifies whether to filter non-billable resources. When true (the default), the operation returns only billable resources.
maxResultsinteger
nextTokenstring
resourceTypesarrayThe CloudFormation resource types to include in the response.
serviceFunctionIdstringFilter resources by service function identifier.

SELECT examples

List resources.

SELECT
input_source,
resource,
resource_identifier
FROM aws.resiliencehubv2.resources
WHERE serviceArn = '{{ serviceArn }}' -- required
AND region = '{{ region }}' -- required
AND serviceFunctionId = '{{ serviceFunctionId }}'
AND awsRegion = '{{ awsRegion }}'
AND resourceTypes = '{{ resourceTypes }}'
AND billable = '{{ billable }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Associates resources with a service function.

INSERT INTO aws.resiliencehubv2.resources (
serviceArn,
serviceFunctionId,
resources,
region
)
SELECT
'{{ serviceArn }}' /* required */,
'{{ serviceFunctionId }}' /* required */,
'{{ resources }}' /* required */,
'{{ region }}'
RETURNING
resources,
service_arn,
service_function_id
;

DELETE examples

Removes resources from a service function.

DELETE FROM aws.resiliencehubv2.resources
WHERE region = '{{ region }}' --required
;