/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace CodeCommit { namespace Model { /** */ class CreateApprovalRuleTemplateRequest : public CodeCommitRequest { public: AWS_CODECOMMIT_API CreateApprovalRuleTemplateRequest(); // 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 "CreateApprovalRuleTemplate"; } AWS_CODECOMMIT_API Aws::String SerializePayload() const override; AWS_CODECOMMIT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the approval rule template. Provide descriptive names, because * this name is applied to the approval rules created automatically in associated * repositories.

*/ inline const Aws::String& GetApprovalRuleTemplateName() const{ return m_approvalRuleTemplateName; } /** *

The name of the approval rule template. Provide descriptive names, because * this name is applied to the approval rules created automatically in associated * repositories.

*/ inline bool ApprovalRuleTemplateNameHasBeenSet() const { return m_approvalRuleTemplateNameHasBeenSet; } /** *

The name of the approval rule template. Provide descriptive names, because * this name is applied to the approval rules created automatically in associated * repositories.

*/ inline void SetApprovalRuleTemplateName(const Aws::String& value) { m_approvalRuleTemplateNameHasBeenSet = true; m_approvalRuleTemplateName = value; } /** *

The name of the approval rule template. Provide descriptive names, because * this name is applied to the approval rules created automatically in associated * repositories.

*/ inline void SetApprovalRuleTemplateName(Aws::String&& value) { m_approvalRuleTemplateNameHasBeenSet = true; m_approvalRuleTemplateName = std::move(value); } /** *

The name of the approval rule template. Provide descriptive names, because * this name is applied to the approval rules created automatically in associated * repositories.

*/ inline void SetApprovalRuleTemplateName(const char* value) { m_approvalRuleTemplateNameHasBeenSet = true; m_approvalRuleTemplateName.assign(value); } /** *

The name of the approval rule template. Provide descriptive names, because * this name is applied to the approval rules created automatically in associated * repositories.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateName(const Aws::String& value) { SetApprovalRuleTemplateName(value); return *this;} /** *

The name of the approval rule template. Provide descriptive names, because * this name is applied to the approval rules created automatically in associated * repositories.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateName(Aws::String&& value) { SetApprovalRuleTemplateName(std::move(value)); return *this;} /** *

The name of the approval rule template. Provide descriptive names, because * this name is applied to the approval rules created automatically in associated * repositories.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateName(const char* value) { SetApprovalRuleTemplateName(value); return *this;} /** *

The content of the approval rule that is created on pull requests in * associated repositories. If you specify one or more destination references * (branches), approval rules are created in an associated repository only if their * destination references (branches) match those specified in the template.

*

When you create the content of the approval rule template, you can * specify approvers in an approval pool in one of two ways:

  • * CodeCommitApprovers: This option only requires an AWS account and a * resource. It can be used for both IAM users and federated access users whose * name matches the provided resource name. This is a very powerful option that * offers a great deal of flexibility. For example, if you specify the AWS account * 123456789012 and Mary_Major, all of the following are counted as * approvals coming from that user:

    • An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline const Aws::String& GetApprovalRuleTemplateContent() const{ return m_approvalRuleTemplateContent; } /** *

The content of the approval rule that is created on pull requests in * associated repositories. If you specify one or more destination references * (branches), approval rules are created in an associated repository only if their * destination references (branches) match those specified in the template.

*

When you create the content of the approval rule template, you can * specify approvers in an approval pool in one of two ways:

  • * CodeCommitApprovers: This option only requires an AWS account and a * resource. It can be used for both IAM users and federated access users whose * name matches the provided resource name. This is a very powerful option that * offers a great deal of flexibility. For example, if you specify the AWS account * 123456789012 and Mary_Major, all of the following are counted as * approvals coming from that user:

    • An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline bool ApprovalRuleTemplateContentHasBeenSet() const { return m_approvalRuleTemplateContentHasBeenSet; } /** *

The content of the approval rule that is created on pull requests in * associated repositories. If you specify one or more destination references * (branches), approval rules are created in an associated repository only if their * destination references (branches) match those specified in the template.

*

When you create the content of the approval rule template, you can * specify approvers in an approval pool in one of two ways:

  • * CodeCommitApprovers: This option only requires an AWS account and a * resource. It can be used for both IAM users and federated access users whose * name matches the provided resource name. This is a very powerful option that * offers a great deal of flexibility. For example, if you specify the AWS account * 123456789012 and Mary_Major, all of the following are counted as * approvals coming from that user:

    • An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline void SetApprovalRuleTemplateContent(const Aws::String& value) { m_approvalRuleTemplateContentHasBeenSet = true; m_approvalRuleTemplateContent = value; } /** *

The content of the approval rule that is created on pull requests in * associated repositories. If you specify one or more destination references * (branches), approval rules are created in an associated repository only if their * destination references (branches) match those specified in the template.

*

When you create the content of the approval rule template, you can * specify approvers in an approval pool in one of two ways:

  • * CodeCommitApprovers: This option only requires an AWS account and a * resource. It can be used for both IAM users and federated access users whose * name matches the provided resource name. This is a very powerful option that * offers a great deal of flexibility. For example, if you specify the AWS account * 123456789012 and Mary_Major, all of the following are counted as * approvals coming from that user:

    • An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline void SetApprovalRuleTemplateContent(Aws::String&& value) { m_approvalRuleTemplateContentHasBeenSet = true; m_approvalRuleTemplateContent = std::move(value); } /** *

The content of the approval rule that is created on pull requests in * associated repositories. If you specify one or more destination references * (branches), approval rules are created in an associated repository only if their * destination references (branches) match those specified in the template.

*

When you create the content of the approval rule template, you can * specify approvers in an approval pool in one of two ways:

  • * CodeCommitApprovers: This option only requires an AWS account and a * resource. It can be used for both IAM users and federated access users whose * name matches the provided resource name. This is a very powerful option that * offers a great deal of flexibility. For example, if you specify the AWS account * 123456789012 and Mary_Major, all of the following are counted as * approvals coming from that user:

    • An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline void SetApprovalRuleTemplateContent(const char* value) { m_approvalRuleTemplateContentHasBeenSet = true; m_approvalRuleTemplateContent.assign(value); } /** *

The content of the approval rule that is created on pull requests in * associated repositories. If you specify one or more destination references * (branches), approval rules are created in an associated repository only if their * destination references (branches) match those specified in the template.

*

When you create the content of the approval rule template, you can * specify approvers in an approval pool in one of two ways:

  • * CodeCommitApprovers: This option only requires an AWS account and a * resource. It can be used for both IAM users and federated access users whose * name matches the provided resource name. This is a very powerful option that * offers a great deal of flexibility. For example, if you specify the AWS account * 123456789012 and Mary_Major, all of the following are counted as * approvals coming from that user:

    • An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateContent(const Aws::String& value) { SetApprovalRuleTemplateContent(value); return *this;} /** *

The content of the approval rule that is created on pull requests in * associated repositories. If you specify one or more destination references * (branches), approval rules are created in an associated repository only if their * destination references (branches) match those specified in the template.

*

When you create the content of the approval rule template, you can * specify approvers in an approval pool in one of two ways:

  • * CodeCommitApprovers: This option only requires an AWS account and a * resource. It can be used for both IAM users and federated access users whose * name matches the provided resource name. This is a very powerful option that * offers a great deal of flexibility. For example, if you specify the AWS account * 123456789012 and Mary_Major, all of the following are counted as * approvals coming from that user:

    • An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateContent(Aws::String&& value) { SetApprovalRuleTemplateContent(std::move(value)); return *this;} /** *

The content of the approval rule that is created on pull requests in * associated repositories. If you specify one or more destination references * (branches), approval rules are created in an associated repository only if their * destination references (branches) match those specified in the template.

*

When you create the content of the approval rule template, you can * specify approvers in an approval pool in one of two ways:

  • * CodeCommitApprovers: This option only requires an AWS account and a * resource. It can be used for both IAM users and federated access users whose * name matches the provided resource name. This is a very powerful option that * offers a great deal of flexibility. For example, if you specify the AWS account * 123456789012 and Mary_Major, all of the following are counted as * approvals coming from that user:

    • An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateContent(const char* value) { SetApprovalRuleTemplateContent(value); return *this;} /** *

The description of the approval rule template. Consider providing a * description that explains what this template does and when it might be * appropriate to associate it with repositories.

*/ inline const Aws::String& GetApprovalRuleTemplateDescription() const{ return m_approvalRuleTemplateDescription; } /** *

The description of the approval rule template. Consider providing a * description that explains what this template does and when it might be * appropriate to associate it with repositories.

*/ inline bool ApprovalRuleTemplateDescriptionHasBeenSet() const { return m_approvalRuleTemplateDescriptionHasBeenSet; } /** *

The description of the approval rule template. Consider providing a * description that explains what this template does and when it might be * appropriate to associate it with repositories.

*/ inline void SetApprovalRuleTemplateDescription(const Aws::String& value) { m_approvalRuleTemplateDescriptionHasBeenSet = true; m_approvalRuleTemplateDescription = value; } /** *

The description of the approval rule template. Consider providing a * description that explains what this template does and when it might be * appropriate to associate it with repositories.

*/ inline void SetApprovalRuleTemplateDescription(Aws::String&& value) { m_approvalRuleTemplateDescriptionHasBeenSet = true; m_approvalRuleTemplateDescription = std::move(value); } /** *

The description of the approval rule template. Consider providing a * description that explains what this template does and when it might be * appropriate to associate it with repositories.

*/ inline void SetApprovalRuleTemplateDescription(const char* value) { m_approvalRuleTemplateDescriptionHasBeenSet = true; m_approvalRuleTemplateDescription.assign(value); } /** *

The description of the approval rule template. Consider providing a * description that explains what this template does and when it might be * appropriate to associate it with repositories.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateDescription(const Aws::String& value) { SetApprovalRuleTemplateDescription(value); return *this;} /** *

The description of the approval rule template. Consider providing a * description that explains what this template does and when it might be * appropriate to associate it with repositories.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateDescription(Aws::String&& value) { SetApprovalRuleTemplateDescription(std::move(value)); return *this;} /** *

The description of the approval rule template. Consider providing a * description that explains what this template does and when it might be * appropriate to associate it with repositories.

*/ inline CreateApprovalRuleTemplateRequest& WithApprovalRuleTemplateDescription(const char* value) { SetApprovalRuleTemplateDescription(value); return *this;} private: Aws::String m_approvalRuleTemplateName; bool m_approvalRuleTemplateNameHasBeenSet = false; Aws::String m_approvalRuleTemplateContent; bool m_approvalRuleTemplateContentHasBeenSet = false; Aws::String m_approvalRuleTemplateDescription; bool m_approvalRuleTemplateDescriptionHasBeenSet = false; }; } // namespace Model } // namespace CodeCommit } // namespace Aws