Path: blob/develop/awscli/customizations/emrcontainers/constants.py
1567 views
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.1#2# Licensed under the Apache License, Version 2.0 (the "License"). You3# may not use this file except in compliance with the License. A copy of4# the License is located at5#6# http://aws.amazon.com/apache2.0/7#8# or in the "license" file accompanying this file. This file is9# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF10# ANY KIND, either express or implied. See the License for the specific11# language governing permissions and limitations under the License.1213# Declare all the constants used by Lifecycle in this file1415# Lifecycle role names16TRUST_POLICY_STATEMENT_FORMAT = '{ \17"Effect": "Allow", \18"Principal": { \19"Federated": "arn:%(AWS_PARTITION)s:iam::%(AWS_ACCOUNT_ID)s:oidc-provider/' \20'%(OIDC_PROVIDER)s" \21}, \22"Action": "sts:AssumeRoleWithWebIdentity", \23"Condition": { \24"StringLike": { \25"%(OIDC_PROVIDER)s:sub": "system:serviceaccount:%(NAMESPACE)s' \26':emr-containers-sa-*-*-%(AWS_ACCOUNT_ID)s-' \27'%(BASE36_ENCODED_ROLE_NAME)s" \28} \29} \30}'3132TRUST_POLICY_STATEMENT_ALREADY_EXISTS = "Trust policy statement already " \33"exists for role %s. No changes " \34"were made!"3536TRUST_POLICY_UPDATE_SUCCESSFUL = "Successfully updated trust policy of role %s"373839