resource_associations
Creates, updates, deletes or gets a resource_association
resource or lists resource_associations
in a region
Overview
Name | resource_associations |
Type | Resource |
Description | Resource Schema for AWS::ServiceCatalogAppRegistry::ResourceAssociation |
Id | aws.servicecatalogappregistry.resource_associations |
Fields
Name | Datatype | Description |
---|---|---|
application | string | The name or the Id of the Application. |
resource | string | The name or the Id of the Resource. |
resource_type | string | The type of the CFN Resource for now it's enum CFN_STACK. |
application_arn | string | |
resource_arn | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Application, Resource, ResourceType, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.servicecatalogappregistry.resource_associations (
Application,
Resource,
ResourceType,
region
)
SELECT
'{{ Application }}',
'{{ Resource }}',
'{{ ResourceType }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.servicecatalogappregistry.resource_associations (
Application,
Resource,
ResourceType,
region
)
SELECT
'{{ Application }}',
'{{ Resource }}',
'{{ ResourceType }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: resource_association
props:
- name: Application
value: '{{ Application }}'
- name: Resource
value: '{{ Resource }}'
- name: ResourceType
value: '{{ ResourceType }}'
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