/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace ServiceCatalog { namespace Model { /** */ class AssociatePrincipalWithPortfolioRequest : public ServiceCatalogRequest { public: AWS_SERVICECATALOG_API AssociatePrincipalWithPortfolioRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "AssociatePrincipalWithPortfolio"; } AWS_SERVICECATALOG_API Aws::String SerializePayload() const override; AWS_SERVICECATALOG_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The language code.

  • jp - Japanese

  • *
  • zh - Chinese

*/ inline const Aws::String& GetAcceptLanguage() const{ return m_acceptLanguage; } /** *

The language code.

  • jp - Japanese

  • *
  • zh - Chinese

*/ inline bool AcceptLanguageHasBeenSet() const { return m_acceptLanguageHasBeenSet; } /** *

The language code.

  • jp - Japanese

  • *
  • zh - Chinese

*/ inline void SetAcceptLanguage(const Aws::String& value) { m_acceptLanguageHasBeenSet = true; m_acceptLanguage = value; } /** *

The language code.

  • jp - Japanese

  • *
  • zh - Chinese

*/ inline void SetAcceptLanguage(Aws::String&& value) { m_acceptLanguageHasBeenSet = true; m_acceptLanguage = std::move(value); } /** *

The language code.

  • jp - Japanese

  • *
  • zh - Chinese

*/ inline void SetAcceptLanguage(const char* value) { m_acceptLanguageHasBeenSet = true; m_acceptLanguage.assign(value); } /** *

The language code.

  • jp - Japanese

  • *
  • zh - Chinese

*/ inline AssociatePrincipalWithPortfolioRequest& WithAcceptLanguage(const Aws::String& value) { SetAcceptLanguage(value); return *this;} /** *

The language code.

  • jp - Japanese

  • *
  • zh - Chinese

*/ inline AssociatePrincipalWithPortfolioRequest& WithAcceptLanguage(Aws::String&& value) { SetAcceptLanguage(std::move(value)); return *this;} /** *

The language code.

  • jp - Japanese

  • *
  • zh - Chinese

*/ inline AssociatePrincipalWithPortfolioRequest& WithAcceptLanguage(const char* value) { SetAcceptLanguage(value); return *this;} /** *

The portfolio identifier.

*/ inline const Aws::String& GetPortfolioId() const{ return m_portfolioId; } /** *

The portfolio identifier.

*/ inline bool PortfolioIdHasBeenSet() const { return m_portfolioIdHasBeenSet; } /** *

The portfolio identifier.

*/ inline void SetPortfolioId(const Aws::String& value) { m_portfolioIdHasBeenSet = true; m_portfolioId = value; } /** *

The portfolio identifier.

*/ inline void SetPortfolioId(Aws::String&& value) { m_portfolioIdHasBeenSet = true; m_portfolioId = std::move(value); } /** *

The portfolio identifier.

*/ inline void SetPortfolioId(const char* value) { m_portfolioIdHasBeenSet = true; m_portfolioId.assign(value); } /** *

The portfolio identifier.

*/ inline AssociatePrincipalWithPortfolioRequest& WithPortfolioId(const Aws::String& value) { SetPortfolioId(value); return *this;} /** *

The portfolio identifier.

*/ inline AssociatePrincipalWithPortfolioRequest& WithPortfolioId(Aws::String&& value) { SetPortfolioId(std::move(value)); return *this;} /** *

The portfolio identifier.

*/ inline AssociatePrincipalWithPortfolioRequest& WithPortfolioId(const char* value) { SetPortfolioId(value); return *this;} /** *

The ARN of the principal (user, role, or group). If the * PrincipalType is IAM, the supported value is a fully * defined IAM * Amazon Resource Name (ARN). If the PrincipalType is * IAM_PATTERN, the supported value is an IAM ARN * without an AccountID in the following format:

* arn:partition:iam:::resource-type/resource-id

The ARN resource-id * can be either:

  • A fully formed resource-id. For example, * arn:aws:iam:::role/resource-name or * arn:aws:iam:::role/resource-path/resource-name

  • A * wildcard ARN. The wildcard ARN accepts IAM_PATTERN values with a * "*" or "?" in the resource-id segment of the ARN. For example * arn:partition:service:::resource-type/resource-path/resource-name. The * new symbols are exclusive to the resource-path and resource-name * and cannot replace the resource-type or other ARN values.

    The ARN * path and principal name allow unlimited wildcard characters.

*

Examples of an acceptable wildcard ARN:

  • *

    arn:aws:iam:::role/ResourceName_*

  • *

    arn:aws:iam:::role/ * /ResourceName_?

Examples of an * unacceptable wildcard ARN:

  • *

    arn:aws:iam:::* /ResourceName

You can associate multiple * IAM_PATTERNs even if the account has no principal with that name. *

The "?" wildcard character matches zero or one of any character. This is * similar to ".?" in regular regex context. The "*" wildcard character matches any * number of any characters. This is similar to ".*" in regular regex context.

*

In the IAM Principal ARN format * (arn:partition:iam:::resource-type/resource-path/resource-name), valid * resource-type values include user/, group/, or role/. The * "?" and "*" characters are allowed only after the resource-type in the * resource-id segment. You can use special characters anywhere within the * resource-id.

The "*" character also matches the "/" character, allowing * paths to be formed within the resource-id. For example, * arn:aws:iam:::role/*/ResourceName_? matches both * arn:aws:iam:::role/pathA/pathB/ResourceName_1 and * arn:aws:iam:::role/pathA/ResourceName_1.

*/ inline const Aws::String& GetPrincipalARN() const{ return m_principalARN; } /** *

The ARN of the principal (user, role, or group). If the * PrincipalType is IAM, the supported value is a fully * defined IAM * Amazon Resource Name (ARN). If the PrincipalType is * IAM_PATTERN, the supported value is an IAM ARN * without an AccountID in the following format:

* arn:partition:iam:::resource-type/resource-id

The ARN resource-id * can be either:

  • A fully formed resource-id. For example, * arn:aws:iam:::role/resource-name or * arn:aws:iam:::role/resource-path/resource-name

  • A * wildcard ARN. The wildcard ARN accepts IAM_PATTERN values with a * "*" or "?" in the resource-id segment of the ARN. For example * arn:partition:service:::resource-type/resource-path/resource-name. The * new symbols are exclusive to the resource-path and resource-name * and cannot replace the resource-type or other ARN values.

    The ARN * path and principal name allow unlimited wildcard characters.

*

Examples of an acceptable wildcard ARN:

  • *

    arn:aws:iam:::role/ResourceName_*

  • *

    arn:aws:iam:::role/ * /ResourceName_?

Examples of an * unacceptable wildcard ARN:

  • *

    arn:aws:iam:::* /ResourceName

You can associate multiple * IAM_PATTERNs even if the account has no principal with that name. *

The "?" wildcard character matches zero or one of any character. This is * similar to ".?" in regular regex context. The "*" wildcard character matches any * number of any characters. This is similar to ".*" in regular regex context.

*

In the IAM Principal ARN format * (arn:partition:iam:::resource-type/resource-path/resource-name), valid * resource-type values include user/, group/, or role/. The * "?" and "*" characters are allowed only after the resource-type in the * resource-id segment. You can use special characters anywhere within the * resource-id.

The "*" character also matches the "/" character, allowing * paths to be formed within the resource-id. For example, * arn:aws:iam:::role/*/ResourceName_? matches both * arn:aws:iam:::role/pathA/pathB/ResourceName_1 and * arn:aws:iam:::role/pathA/ResourceName_1.

*/ inline bool PrincipalARNHasBeenSet() const { return m_principalARNHasBeenSet; } /** *

The ARN of the principal (user, role, or group). If the * PrincipalType is IAM, the supported value is a fully * defined IAM * Amazon Resource Name (ARN). If the PrincipalType is * IAM_PATTERN, the supported value is an IAM ARN * without an AccountID in the following format:

* arn:partition:iam:::resource-type/resource-id

The ARN resource-id * can be either:

  • A fully formed resource-id. For example, * arn:aws:iam:::role/resource-name or * arn:aws:iam:::role/resource-path/resource-name

  • A * wildcard ARN. The wildcard ARN accepts IAM_PATTERN values with a * "*" or "?" in the resource-id segment of the ARN. For example * arn:partition:service:::resource-type/resource-path/resource-name. The * new symbols are exclusive to the resource-path and resource-name * and cannot replace the resource-type or other ARN values.

    The ARN * path and principal name allow unlimited wildcard characters.

*

Examples of an acceptable wildcard ARN:

  • *

    arn:aws:iam:::role/ResourceName_*

  • *

    arn:aws:iam:::role/ * /ResourceName_?

Examples of an * unacceptable wildcard ARN:

  • *

    arn:aws:iam:::* /ResourceName

You can associate multiple * IAM_PATTERNs even if the account has no principal with that name. *

The "?" wildcard character matches zero or one of any character. This is * similar to ".?" in regular regex context. The "*" wildcard character matches any * number of any characters. This is similar to ".*" in regular regex context.

*

In the IAM Principal ARN format * (arn:partition:iam:::resource-type/resource-path/resource-name), valid * resource-type values include user/, group/, or role/. The * "?" and "*" characters are allowed only after the resource-type in the * resource-id segment. You can use special characters anywhere within the * resource-id.

The "*" character also matches the "/" character, allowing * paths to be formed within the resource-id. For example, * arn:aws:iam:::role/*/ResourceName_? matches both * arn:aws:iam:::role/pathA/pathB/ResourceName_1 and * arn:aws:iam:::role/pathA/ResourceName_1.

*/ inline void SetPrincipalARN(const Aws::String& value) { m_principalARNHasBeenSet = true; m_principalARN = value; } /** *

The ARN of the principal (user, role, or group). If the * PrincipalType is IAM, the supported value is a fully * defined IAM * Amazon Resource Name (ARN). If the PrincipalType is * IAM_PATTERN, the supported value is an IAM ARN * without an AccountID in the following format:

* arn:partition:iam:::resource-type/resource-id

The ARN resource-id * can be either:

  • A fully formed resource-id. For example, * arn:aws:iam:::role/resource-name or * arn:aws:iam:::role/resource-path/resource-name

  • A * wildcard ARN. The wildcard ARN accepts IAM_PATTERN values with a * "*" or "?" in the resource-id segment of the ARN. For example * arn:partition:service:::resource-type/resource-path/resource-name. The * new symbols are exclusive to the resource-path and resource-name * and cannot replace the resource-type or other ARN values.

    The ARN * path and principal name allow unlimited wildcard characters.

*

Examples of an acceptable wildcard ARN:

  • *

    arn:aws:iam:::role/ResourceName_*

  • *

    arn:aws:iam:::role/ * /ResourceName_?

Examples of an * unacceptable wildcard ARN:

  • *

    arn:aws:iam:::* /ResourceName

You can associate multiple * IAM_PATTERNs even if the account has no principal with that name. *

The "?" wildcard character matches zero or one of any character. This is * similar to ".?" in regular regex context. The "*" wildcard character matches any * number of any characters. This is similar to ".*" in regular regex context.

*

In the IAM Principal ARN format * (arn:partition:iam:::resource-type/resource-path/resource-name), valid * resource-type values include user/, group/, or role/. The * "?" and "*" characters are allowed only after the resource-type in the * resource-id segment. You can use special characters anywhere within the * resource-id.

The "*" character also matches the "/" character, allowing * paths to be formed within the resource-id. For example, * arn:aws:iam:::role/*/ResourceName_? matches both * arn:aws:iam:::role/pathA/pathB/ResourceName_1 and * arn:aws:iam:::role/pathA/ResourceName_1.

*/ inline void SetPrincipalARN(Aws::String&& value) { m_principalARNHasBeenSet = true; m_principalARN = std::move(value); } /** *

The ARN of the principal (user, role, or group). If the * PrincipalType is IAM, the supported value is a fully * defined IAM * Amazon Resource Name (ARN). If the PrincipalType is * IAM_PATTERN, the supported value is an IAM ARN * without an AccountID in the following format:

* arn:partition:iam:::resource-type/resource-id

The ARN resource-id * can be either:

  • A fully formed resource-id. For example, * arn:aws:iam:::role/resource-name or * arn:aws:iam:::role/resource-path/resource-name

  • A * wildcard ARN. The wildcard ARN accepts IAM_PATTERN values with a * "*" or "?" in the resource-id segment of the ARN. For example * arn:partition:service:::resource-type/resource-path/resource-name. The * new symbols are exclusive to the resource-path and resource-name * and cannot replace the resource-type or other ARN values.

    The ARN * path and principal name allow unlimited wildcard characters.

*

Examples of an acceptable wildcard ARN:

  • *

    arn:aws:iam:::role/ResourceName_*

  • *

    arn:aws:iam:::role/ * /ResourceName_?

Examples of an * unacceptable wildcard ARN:

  • *

    arn:aws:iam:::* /ResourceName

You can associate multiple * IAM_PATTERNs even if the account has no principal with that name. *

The "?" wildcard character matches zero or one of any character. This is * similar to ".?" in regular regex context. The "*" wildcard character matches any * number of any characters. This is similar to ".*" in regular regex context.

*

In the IAM Principal ARN format * (arn:partition:iam:::resource-type/resource-path/resource-name), valid * resource-type values include user/, group/, or role/. The * "?" and "*" characters are allowed only after the resource-type in the * resource-id segment. You can use special characters anywhere within the * resource-id.

The "*" character also matches the "/" character, allowing * paths to be formed within the resource-id. For example, * arn:aws:iam:::role/*/ResourceName_? matches both * arn:aws:iam:::role/pathA/pathB/ResourceName_1 and * arn:aws:iam:::role/pathA/ResourceName_1.

*/ inline void SetPrincipalARN(const char* value) { m_principalARNHasBeenSet = true; m_principalARN.assign(value); } /** *

The ARN of the principal (user, role, or group). If the * PrincipalType is IAM, the supported value is a fully * defined IAM * Amazon Resource Name (ARN). If the PrincipalType is * IAM_PATTERN, the supported value is an IAM ARN * without an AccountID in the following format:

* arn:partition:iam:::resource-type/resource-id

The ARN resource-id * can be either:

  • A fully formed resource-id. For example, * arn:aws:iam:::role/resource-name or * arn:aws:iam:::role/resource-path/resource-name

  • A * wildcard ARN. The wildcard ARN accepts IAM_PATTERN values with a * "*" or "?" in the resource-id segment of the ARN. For example * arn:partition:service:::resource-type/resource-path/resource-name. The * new symbols are exclusive to the resource-path and resource-name * and cannot replace the resource-type or other ARN values.

    The ARN * path and principal name allow unlimited wildcard characters.

*

Examples of an acceptable wildcard ARN:

  • *

    arn:aws:iam:::role/ResourceName_*

  • *

    arn:aws:iam:::role/ * /ResourceName_?

Examples of an * unacceptable wildcard ARN:

  • *

    arn:aws:iam:::* /ResourceName

You can associate multiple * IAM_PATTERNs even if the account has no principal with that name. *

The "?" wildcard character matches zero or one of any character. This is * similar to ".?" in regular regex context. The "*" wildcard character matches any * number of any characters. This is similar to ".*" in regular regex context.

*

In the IAM Principal ARN format * (arn:partition:iam:::resource-type/resource-path/resource-name), valid * resource-type values include user/, group/, or role/. The * "?" and "*" characters are allowed only after the resource-type in the * resource-id segment. You can use special characters anywhere within the * resource-id.

The "*" character also matches the "/" character, allowing * paths to be formed within the resource-id. For example, * arn:aws:iam:::role/*/ResourceName_? matches both * arn:aws:iam:::role/pathA/pathB/ResourceName_1 and * arn:aws:iam:::role/pathA/ResourceName_1.

*/ inline AssociatePrincipalWithPortfolioRequest& WithPrincipalARN(const Aws::String& value) { SetPrincipalARN(value); return *this;} /** *

The ARN of the principal (user, role, or group). If the * PrincipalType is IAM, the supported value is a fully * defined IAM * Amazon Resource Name (ARN). If the PrincipalType is * IAM_PATTERN, the supported value is an IAM ARN * without an AccountID in the following format:

* arn:partition:iam:::resource-type/resource-id

The ARN resource-id * can be either:

  • A fully formed resource-id. For example, * arn:aws:iam:::role/resource-name or * arn:aws:iam:::role/resource-path/resource-name

  • A * wildcard ARN. The wildcard ARN accepts IAM_PATTERN values with a * "*" or "?" in the resource-id segment of the ARN. For example * arn:partition:service:::resource-type/resource-path/resource-name. The * new symbols are exclusive to the resource-path and resource-name * and cannot replace the resource-type or other ARN values.

    The ARN * path and principal name allow unlimited wildcard characters.

*

Examples of an acceptable wildcard ARN:

  • *

    arn:aws:iam:::role/ResourceName_*

  • *

    arn:aws:iam:::role/ * /ResourceName_?

Examples of an * unacceptable wildcard ARN:

  • *

    arn:aws:iam:::* /ResourceName

You can associate multiple * IAM_PATTERNs even if the account has no principal with that name. *

The "?" wildcard character matches zero or one of any character. This is * similar to ".?" in regular regex context. The "*" wildcard character matches any * number of any characters. This is similar to ".*" in regular regex context.

*

In the IAM Principal ARN format * (arn:partition:iam:::resource-type/resource-path/resource-name), valid * resource-type values include user/, group/, or role/. The * "?" and "*" characters are allowed only after the resource-type in the * resource-id segment. You can use special characters anywhere within the * resource-id.

The "*" character also matches the "/" character, allowing * paths to be formed within the resource-id. For example, * arn:aws:iam:::role/*/ResourceName_? matches both * arn:aws:iam:::role/pathA/pathB/ResourceName_1 and * arn:aws:iam:::role/pathA/ResourceName_1.

*/ inline AssociatePrincipalWithPortfolioRequest& WithPrincipalARN(Aws::String&& value) { SetPrincipalARN(std::move(value)); return *this;} /** *

The ARN of the principal (user, role, or group). If the * PrincipalType is IAM, the supported value is a fully * defined IAM * Amazon Resource Name (ARN). If the PrincipalType is * IAM_PATTERN, the supported value is an IAM ARN * without an AccountID in the following format:

* arn:partition:iam:::resource-type/resource-id

The ARN resource-id * can be either:

  • A fully formed resource-id. For example, * arn:aws:iam:::role/resource-name or * arn:aws:iam:::role/resource-path/resource-name

  • A * wildcard ARN. The wildcard ARN accepts IAM_PATTERN values with a * "*" or "?" in the resource-id segment of the ARN. For example * arn:partition:service:::resource-type/resource-path/resource-name. The * new symbols are exclusive to the resource-path and resource-name * and cannot replace the resource-type or other ARN values.

    The ARN * path and principal name allow unlimited wildcard characters.

*

Examples of an acceptable wildcard ARN:

  • *

    arn:aws:iam:::role/ResourceName_*

  • *

    arn:aws:iam:::role/ * /ResourceName_?

Examples of an * unacceptable wildcard ARN:

  • *

    arn:aws:iam:::* /ResourceName

You can associate multiple * IAM_PATTERNs even if the account has no principal with that name. *

The "?" wildcard character matches zero or one of any character. This is * similar to ".?" in regular regex context. The "*" wildcard character matches any * number of any characters. This is similar to ".*" in regular regex context.

*

In the IAM Principal ARN format * (arn:partition:iam:::resource-type/resource-path/resource-name), valid * resource-type values include user/, group/, or role/. The * "?" and "*" characters are allowed only after the resource-type in the * resource-id segment. You can use special characters anywhere within the * resource-id.

The "*" character also matches the "/" character, allowing * paths to be formed within the resource-id. For example, * arn:aws:iam:::role/*/ResourceName_? matches both * arn:aws:iam:::role/pathA/pathB/ResourceName_1 and * arn:aws:iam:::role/pathA/ResourceName_1.

*/ inline AssociatePrincipalWithPortfolioRequest& WithPrincipalARN(const char* value) { SetPrincipalARN(value); return *this;} /** *

The principal type. The supported value is IAM if you use a * fully defined Amazon Resource Name (ARN), or IAM_PATTERN if you use * an ARN with no accountID, with or without wildcard characters.

*/ inline const PrincipalType& GetPrincipalType() const{ return m_principalType; } /** *

The principal type. The supported value is IAM if you use a * fully defined Amazon Resource Name (ARN), or IAM_PATTERN if you use * an ARN with no accountID, with or without wildcard characters.

*/ inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; } /** *

The principal type. The supported value is IAM if you use a * fully defined Amazon Resource Name (ARN), or IAM_PATTERN if you use * an ARN with no accountID, with or without wildcard characters.

*/ inline void SetPrincipalType(const PrincipalType& value) { m_principalTypeHasBeenSet = true; m_principalType = value; } /** *

The principal type. The supported value is IAM if you use a * fully defined Amazon Resource Name (ARN), or IAM_PATTERN if you use * an ARN with no accountID, with or without wildcard characters.

*/ inline void SetPrincipalType(PrincipalType&& value) { m_principalTypeHasBeenSet = true; m_principalType = std::move(value); } /** *

The principal type. The supported value is IAM if you use a * fully defined Amazon Resource Name (ARN), or IAM_PATTERN if you use * an ARN with no accountID, with or without wildcard characters.

*/ inline AssociatePrincipalWithPortfolioRequest& WithPrincipalType(const PrincipalType& value) { SetPrincipalType(value); return *this;} /** *

The principal type. The supported value is IAM if you use a * fully defined Amazon Resource Name (ARN), or IAM_PATTERN if you use * an ARN with no accountID, with or without wildcard characters.

*/ inline AssociatePrincipalWithPortfolioRequest& WithPrincipalType(PrincipalType&& value) { SetPrincipalType(std::move(value)); return *this;} private: Aws::String m_acceptLanguage; bool m_acceptLanguageHasBeenSet = false; Aws::String m_portfolioId; bool m_portfolioIdHasBeenSet = false; Aws::String m_principalARN; bool m_principalARNHasBeenSet = false; PrincipalType m_principalType; bool m_principalTypeHasBeenSet = false; }; } // namespace Model } // namespace ServiceCatalog } // namespace Aws