Skip to main content

profiles

Creates, updates, deletes or gets a profile resource or lists profiles in a region

Overview

Nameprofiles
TypeResource
DescriptionDefinition of AWS::RolesAnywhere::Profile Resource Type
Idaws.rolesanywhere.profiles

Fields

NameDatatypeDescription
duration_secondsnumber
enabledboolean
managed_policy_arnsarray
namestring
profile_arnstring
profile_idstring
require_instance_propertiesboolean
role_arnsarray
session_policystring
tagsarray
attribute_mappingsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, RoleArns, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.rolesanywhere.profiles (
Name,
RoleArns,
region
)
SELECT
'{{ Name }}',
'{{ RoleArns }}',
'{{ region }}';

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