profiles
Creates, updates, deletes or gets a profile
resource or lists profiles
in a region
Overview
Name | profiles |
Type | Resource |
Description | Definition of AWS::RolesAnywhere::Profile Resource Type |
Id | aws.rolesanywhere.profiles |
Fields
Name | Datatype | Description |
---|---|---|
duration_seconds | number | |
enabled | boolean | |
managed_policy_arns | array | |
name | string | |
profile_arn | string | |
profile_id | string | |
require_instance_properties | boolean | |
role_arns | array | |
session_policy | string | |
tags | array | |
attribute_mappings | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, RoleArns, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all profiles
in a region.
SELECT
region,
duration_seconds,
enabled,
managed_policy_arns,
name,
profile_arn,
profile_id,
require_instance_properties,
role_arns,
session_policy,
tags,
attribute_mappings
FROM aws.rolesanywhere.profiles
WHERE region = 'us-east-1';
Gets all properties from an individual profile
.
SELECT
region,
duration_seconds,
enabled,
managed_policy_arns,
name,
profile_arn,
profile_id,
require_instance_properties,
role_arns,
session_policy,
tags,
attribute_mappings
FROM aws.rolesanywhere.profiles
WHERE region = 'us-east-1' AND data__Identifier = '<ProfileId>';
INSERT
example
Use the following StackQL query and manifest file to create a new profile
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.rolesanywhere.profiles (
Name,
RoleArns,
region
)
SELECT
'{{ Name }}',
'{{ RoleArns }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.rolesanywhere.profiles (
DurationSeconds,
Enabled,
ManagedPolicyArns,
Name,
RequireInstanceProperties,
RoleArns,
SessionPolicy,
Tags,
AttributeMappings,
region
)
SELECT
'{{ DurationSeconds }}',
'{{ Enabled }}',
'{{ ManagedPolicyArns }}',
'{{ Name }}',
'{{ RequireInstanceProperties }}',
'{{ RoleArns }}',
'{{ SessionPolicy }}',
'{{ Tags }}',
'{{ AttributeMappings }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: profile
props:
- name: DurationSeconds
value: null
- name: Enabled
value: '{{ Enabled }}'
- name: ManagedPolicyArns
value:
- '{{ ManagedPolicyArns[0] }}'
- name: Name
value: '{{ Name }}'
- name: RequireInstanceProperties
value: '{{ RequireInstanceProperties }}'
- name: RoleArns
value:
- '{{ RoleArns[0] }}'
- name: SessionPolicy
value: '{{ SessionPolicy }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: AttributeMappings
value:
- MappingRules:
- Specifier: '{{ Specifier }}'
CertificateField: '{{ CertificateField }}'
DELETE
example
/*+ delete */
DELETE FROM aws.rolesanywhere.profiles
WHERE data__Identifier = '<ProfileId>'
AND region = 'us-east-1';
Permissions
To operate on the profiles
resource, the following permissions are required:
Create
iam:GetRole,
iam:GetPolicy,
iam:PassRole,
rolesanywhere:CreateProfile,
rolesanywhere:TagResource,
rolesanywhere:ListTagsForResource,
rolesanywhere:PutAttributeMapping,
rolesanywhere:DeleteAttributeMapping
Read
rolesanywhere:GetProfile,
rolesanywhere:ListTagsForResource
Update
iam:GetRole,
iam:GetPolicy,
iam:PassRole,
rolesanywhere:GetProfile,
rolesanywhere:UpdateProfile,
rolesanywhere:EnableProfile,
rolesanywhere:DisableProfile,
rolesanywhere:TagResource,
rolesanywhere:UntagResource,
rolesanywhere:ListTagsForResource,
rolesanywhere:PutAttributeMapping,
rolesanywhere:DeleteAttributeMapping
Delete
rolesanywhere:DeleteProfile
List
rolesanywhere:ListProfiles,
rolesanywhere:ListTagsForResource