Skip to main content

resource_associations

Creates, updates, deletes or gets a resource_association resource or lists resource_associations in a region

Overview

Nameresource_associations
TypeResource
DescriptionResource Schema for AWS::ServiceCatalogAppRegistry::ResourceAssociation
Idaws.servicecatalogappregistry.resource_associations

Fields

NameDatatypeDescription
applicationstringThe name or the Id of the Application.
resourcestringThe name or the Id of the Resource.
resource_typestringThe type of the CFN Resource for now it's enum CFN_STACK.
application_arnstring
resource_arnstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTApplication, Resource, ResourceType, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all resource_associations in a region.

SELECT
region,
application,
resource,
resource_type,
application_arn,
resource_arn
FROM aws.servicecatalogappregistry.resource_associations
WHERE region = 'us-east-1';

Gets all properties from an individual resource_association.

SELECT
region,
application,
resource,
resource_type,
application_arn,
resource_arn
FROM aws.servicecatalogappregistry.resource_associations
WHERE region = 'us-east-1' AND data__Identifier = '<ApplicationArn>|<ResourceArn>|<ResourceType>';

INSERT example

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

/*+ create */
INSERT INTO aws.servicecatalogappregistry.resource_associations (
Application,
Resource,
ResourceType,
region
)
SELECT
'{{ Application }}',
'{{ Resource }}',
'{{ ResourceType }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.servicecatalogappregistry.resource_associations
WHERE data__Identifier = '<ApplicationArn|ResourceArn|ResourceType>'
AND region = 'us-east-1';

Permissions

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

Create

servicecatalog:AssociateResource,
cloudformation:DescribeStacks

Read

servicecatalog:ListAssociatedResources

Delete

servicecatalog:DisassociateResource

List

servicecatalog:ListAssociatedResources