libZSservicesZSamazonka-codecommitZSamazonka-codecommit
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CodeCommit.CreatePullRequestApprovalRule

Description

Creates an approval rule for a pull request.

Synopsis

Creating a Request

data CreatePullRequestApprovalRule Source #

See: newCreatePullRequestApprovalRule smart constructor.

Constructors

CreatePullRequestApprovalRule' 

Fields

  • pullRequestId :: Text

    The system-generated ID of the pull request for which you want to create the approval rule.

  • approvalRuleName :: Text

    The name for the approval rule.

  • approvalRuleContent :: Text

    The content of the approval rule, including the number of approvals needed and the structure of an approval pool defined for approvals, if any. For more information about approval pools, see the AWS CodeCommit User Guide.

    When you create the content of the approval rule, 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 would be 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.

Instances

Instances details
Eq CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

Read CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

Show CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

Generic CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

Associated Types

type Rep CreatePullRequestApprovalRule :: Type -> Type #

NFData CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

Hashable CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

ToJSON CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

AWSRequest CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

ToHeaders CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

ToPath CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

ToQuery CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

type Rep CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

type Rep CreatePullRequestApprovalRule = D1 ('MetaData "CreatePullRequestApprovalRule" "Amazonka.CodeCommit.CreatePullRequestApprovalRule" "libZSservicesZSamazonka-codecommitZSamazonka-codecommit" 'False) (C1 ('MetaCons "CreatePullRequestApprovalRule'" 'PrefixI 'True) (S1 ('MetaSel ('Just "pullRequestId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "approvalRuleName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "approvalRuleContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse CreatePullRequestApprovalRule Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

newCreatePullRequestApprovalRule Source #

Create a value of CreatePullRequestApprovalRule with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:pullRequestId:CreatePullRequestApprovalRule', createPullRequestApprovalRule_pullRequestId - The system-generated ID of the pull request for which you want to create the approval rule.

$sel:approvalRuleName:CreatePullRequestApprovalRule', createPullRequestApprovalRule_approvalRuleName - The name for the approval rule.

$sel:approvalRuleContent:CreatePullRequestApprovalRule', createPullRequestApprovalRule_approvalRuleContent - The content of the approval rule, including the number of approvals needed and the structure of an approval pool defined for approvals, if any. For more information about approval pools, see the AWS CodeCommit User Guide.

When you create the content of the approval rule, 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 would be 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.

Request Lenses

createPullRequestApprovalRule_pullRequestId :: Lens' CreatePullRequestApprovalRule Text Source #

The system-generated ID of the pull request for which you want to create the approval rule.

createPullRequestApprovalRule_approvalRuleContent :: Lens' CreatePullRequestApprovalRule Text Source #

The content of the approval rule, including the number of approvals needed and the structure of an approval pool defined for approvals, if any. For more information about approval pools, see the AWS CodeCommit User Guide.

When you create the content of the approval rule, 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 would be 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.

Destructuring the Response

data CreatePullRequestApprovalRuleResponse Source #

Constructors

CreatePullRequestApprovalRuleResponse' 

Fields

Instances

Instances details
Eq CreatePullRequestApprovalRuleResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

Read CreatePullRequestApprovalRuleResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

Show CreatePullRequestApprovalRuleResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

Generic CreatePullRequestApprovalRuleResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

NFData CreatePullRequestApprovalRuleResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

type Rep CreatePullRequestApprovalRuleResponse Source # 
Instance details

Defined in Amazonka.CodeCommit.CreatePullRequestApprovalRule

type Rep CreatePullRequestApprovalRuleResponse = D1 ('MetaData "CreatePullRequestApprovalRuleResponse" "Amazonka.CodeCommit.CreatePullRequestApprovalRule" "libZSservicesZSamazonka-codecommitZSamazonka-codecommit" 'False) (C1 ('MetaCons "CreatePullRequestApprovalRuleResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "approvalRule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ApprovalRule)))

Response Lenses