ManualApprovalAction Class
Manual approval action.
Example
ts
const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
const approveStage = pipeline.addStage({ stageName: 'Approve' });
const manualApprovalAction = new codepipeline_actions.ManualApprovalAction({
actionName: 'Approve',
});
approveStage.addAction(manualApprovalAction);
const role = iam.Role.fromRoleArn(this, 'Admin', Arn.format({ service: 'iam', resource: 'role', resourceName: 'Admin' }, this));
manualApprovalAction.grantManualApproval(role);
python
from aws_cdk import ArnComponents
pipeline = codepipeline.Pipeline(self, "MyPipeline")
approve_stage = pipeline.add_stage(stage_name="Approve")
manual_approval_action = codepipeline_actions.ManualApprovalAction(
action_name="Approve"
)
approve_stage.add_action(manual_approval_action)
role = iam.Role.from_role_arn(self, "Admin", Arn.format(ArnComponents(service="iam", resource="role", resource_name="Admin"), self))
manual_approval_action.grant_manual_approval(role)
java
Pipeline pipeline = new Pipeline(this, "MyPipeline");
IStage approveStage = pipeline.addStage(StageOptions.builder().stageName("Approve").build());
ManualApprovalAction manualApprovalAction = ManualApprovalAction.Builder.create()
.actionName("Approve")
.build();
approveStage.addAction(manualApprovalAction);
IRole role = Role.fromRoleArn(this, "Admin", Arn.format(ArnComponents.builder().service("iam").resource("role").resourceName("Admin").build(), this));
manualApprovalAction.grantManualApproval(role);
csharp
// Install: dotnet add package Amazon.CDK.Lib
var pipeline = new Pipeline(this, "MyPipeline");
var approveStage = pipeline.AddStage(new StageOptions { StageName = "Approve" });
var manualApprovalAction = new ManualApprovalAction(new ManualApprovalActionProps {
ActionName = "Approve"
});
approveStage.AddAction(manualApprovalAction);
var role = Role.FromRoleArn(this, "Admin", Arn.Format(new ArnComponents { Service = "iam", Resource = "role", ResourceName = "Admin" }, this));
manualApprovalAction.GrantManualApproval(role);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
approveStage := pipeline.AddStage(&StageOptions{
StageName: jsii.String("Approve"),
})
manualApprovalAction := codepipeline_actions.NewManualApprovalAction(&ManualApprovalActionProps{
ActionName: jsii.String("Approve"),
})
approveStage.AddAction(manualApprovalAction)
role := iam.Role_FromRoleArn(this, jsii.String("Admin"), awscdk.Arn_Format(&ArnComponents{
Service: jsii.String("iam"),
Resource: jsii.String("role"),
ResourceName: jsii.String("Admin"),
}, this))
manualApprovalAction.GrantManualApproval(role)
Initializer
ts
new ManualApprovalAction(props: ManualApprovalActionProps)
python
ManualApprovalAction(props: ManualApprovalActionProps)
java
new ManualApprovalAction(ManualApprovalActionProps props)
csharp
new ManualApprovalAction(ManualApprovalActionProps props)
go
NewManualApprovalAction(Props ManualApprovalActionProps)
Properties
actionPropertiesActionPropertiesaction_propertiesActionPropertiesactionPropertiesActionPropertiesActionPropertiesActionPropertiesActionPropertiesActionPropertiesrequired#The simple properties of the Action, like its Owner, name, etc.
Note that this accessor will be called before the bind callback.
Methods
bind(scope: Construct, stage: IStage, options: ActionBindOptions): ActionConfigdef bind(self, scope: Construct, stage: IStage, options: ActionBindOptions) -> ActionConfigpublic ActionConfig bind(Construct scope, IStage stage, ActionBindOptions options)public ActionConfig Bind(Construct scope, IStage stage, ActionBindOptions options)func Bind(Scope Construct, Stage IStage, Options ActionBindOptions) ActionConfig#The callback invoked when this Action is added to a Pipeline.
grantManualApproval(grantable: IGrantable): voiddef grant_manual_approval(self, grantable: IGrantable) -> Nonepublic void grantManualApproval(IGrantable grantable)public void GrantManualApproval(IGrantable grantable)func GrantManualApproval(Grantable IGrantable)#grant the provided principal the permissions to approve or reject this manual approval action.
For more info see: https://docs.aws.amazon.com/codepipeline/latest/userguide/approvals-iam-permissions.html
[disable-awslint:no-grants]
1 parameter
Parameters
grantablegrantablegrantablegrantableGrantable— the grantable to attach the permissions to.
onStateChange(name: string, target?: IRuleTarget, options?: RuleProps): Ruledef on_state_change(self, name: str, target: typing.Optional[IRuleTarget] = None, options: typing.Optional[RuleProps] = None) -> Rulepublic Rule onStateChange(String name, IRuleTarget target, RuleProps options)public Rule OnStateChange(string name, IRuleTarget? target = null, RuleProps? options = null)func OnStateChange(Name *string, Target IRuleTarget, Options RuleProps) Rule#Creates an Event that will be triggered whenever the state of this Action changes.