instance_profiles
Creates, updates, deletes or gets an instance_profile resource or lists instance_profiles in a region
Overview
| Name | instance_profiles |
| Type | Resource |
| Description | Resource schema for AWS::DMS::InstanceProfile. |
| Id | awscc.dms.instance_profiles |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
instance_profile_arn | string | The property describes an ARN of the instance profile. |
instance_profile_identifier | string | The property describes an identifier for the instance profile. It is used for describing/deleting/modifying. Can be name/arn |
availability_zone | string | The property describes an availability zone of the instance profile. |
description | string | The optional description of the instance profile. |
kms_key_arn | string | The property describes kms key arn for the instance profile. |
publicly_accessible | boolean | The property describes the publicly accessible of the instance profile |
network_type | string | The property describes a network type for the instance profile. |
instance_profile_name | string | The property describes a name for the instance profile. |
instance_profile_creation_time | string | The property describes a creating time of the instance profile. |
subnet_group_identifier | string | The property describes a subnet group identifier for the instance profile. |
vpc_security_groups | array | The property describes vps security groups for the instance profile. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
instance_profile_arn | string | The property describes an ARN of the instance profile. |
region | string | AWS region. |
For more information, see AWS::DMS::InstanceProfile.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | instance_profiles | INSERT | region |
delete_resource | instance_profiles | DELETE | Identifier, region |
update_resource | instance_profiles | UPDATE | Identifier, PatchDocument, region |
list_resources | instance_profiles_list_only | SELECT | region |
get_resource | instance_profiles | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual instance_profile.
SELECT
region,
instance_profile_arn,
instance_profile_identifier,
availability_zone,
description,
kms_key_arn,
publicly_accessible,
network_type,
instance_profile_name,
instance_profile_creation_time,
subnet_group_identifier,
vpc_security_groups,
tags
FROM awscc.dms.instance_profiles
WHERE
region = '{{ region }}' AND
Identifier = '{{ instance_profile_arn }}';
Lists all instance_profiles in a region.
SELECT
region,
instance_profile_arn
FROM awscc.dms.instance_profiles_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new instance_profile resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.dms.instance_profiles (
InstanceProfileIdentifier,
AvailabilityZone,
Description,
KmsKeyArn,
PubliclyAccessible,
NetworkType,
InstanceProfileName,
SubnetGroupIdentifier,
VpcSecurityGroups,
Tags,
region
)
SELECT
'{{ instance_profile_identifier }}',
'{{ availability_zone }}',
'{{ description }}',
'{{ kms_key_arn }}',
'{{ publicly_accessible }}',
'{{ network_type }}',
'{{ instance_profile_name }}',
'{{ subnet_group_identifier }}',
'{{ vpc_security_groups }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.dms.instance_profiles (
InstanceProfileIdentifier,
AvailabilityZone,
Description,
KmsKeyArn,
PubliclyAccessible,
NetworkType,
InstanceProfileName,
SubnetGroupIdentifier,
VpcSecurityGroups,
Tags,
region
)
SELECT
'{{ instance_profile_identifier }}',
'{{ availability_zone }}',
'{{ description }}',
'{{ kms_key_arn }}',
'{{ publicly_accessible }}',
'{{ network_type }}',
'{{ instance_profile_name }}',
'{{ subnet_group_identifier }}',
'{{ vpc_security_groups }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: instance_profile
props:
- name: instance_profile_identifier
value: '{{ instance_profile_identifier }}'
- name: availability_zone
value: '{{ availability_zone }}'
- name: description
value: '{{ description }}'
- name: kms_key_arn
value: '{{ kms_key_arn }}'
- name: publicly_accessible
value: '{{ publicly_accessible }}'
- name: network_type
value: '{{ network_type }}'
- name: instance_profile_name
value: '{{ instance_profile_name }}'
- name: subnet_group_identifier
value: '{{ subnet_group_identifier }}'
- name: vpc_security_groups
value:
- '{{ vpc_security_groups[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a instance_profile resource, using stack-deploy.
/*+ update */
UPDATE awscc.dms.instance_profiles
SET PatchDocument = string('{{ {
"InstanceProfileIdentifier": instance_profile_identifier,
"AvailabilityZone": availability_zone,
"Description": description,
"KmsKeyArn": kms_key_arn,
"PubliclyAccessible": publicly_accessible,
"NetworkType": network_type,
"InstanceProfileName": instance_profile_name,
"SubnetGroupIdentifier": subnet_group_identifier,
"VpcSecurityGroups": vpc_security_groups,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ instance_profile_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.dms.instance_profiles
WHERE
Identifier = '{{ instance_profile_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:
| Parameter | Description |
|---|---|
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 instance_profiles resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
dms:CreateInstanceProfile,
dms:ListInstanceProfiles,
dms:DescribeInstanceProfiles,
dms:AddTagsToResource,
dms:ListTagsForResource
dms:ListInstanceProfiles,
dms:DescribeInstanceProfiles,
dms:ListTagsForResource
dms:UpdateInstanceProfile,
dms:ModifyInstanceProfile,
dms:AddTagsToResource,
dms:RemoveTagsFromResource,
dms:ListTagsForResource
dms:DeleteInstanceProfile
dms:ListInstanceProfiles,
dms:DescribeInstanceProfiles,
dms:ListTagsForResource