Skip to content
v2.278.0

AddToPrincipalPolicyResult Struct ​

Result of calling addToPrincipalPolicy.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
import * as constructs from 'constructs';

declare const dependable: constructs.IDependable;
const addToPrincipalPolicyResult: iam.AddToPrincipalPolicyResult = {
  statementAdded: false,

  // the properties below are optional
  policyDependable: dependable,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iam as iam
import constructs as constructs

# dependable: constructs.IDependable

add_to_principal_policy_result = iam.AddToPrincipalPolicyResult(
    statement_added=False,

    # the properties below are optional
    policy_dependable=dependable
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iam.*;
import software.constructs.*;

IDependable dependable;

AddToPrincipalPolicyResult addToPrincipalPolicyResult = AddToPrincipalPolicyResult.builder()
        .statementAdded(false)

        // the properties below are optional
        .policyDependable(dependable)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IAM;
using Constructs;

IDependable dependable;
var addToPrincipalPolicyResult = new AddToPrincipalPolicyResult {
    StatementAdded = false,

    // the properties below are optional
    PolicyDependable = dependable
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import constructs "github.com/aws/constructs-go/constructs"

var dependable IDependable

addToPrincipalPolicyResult := &AddToPrincipalPolicyResult{
	StatementAdded: jsii.Boolean(false),

	// the properties below are optional
	PolicyDependable: dependable,
}

Properties ​

policyDependableoptionalIDependablepolicy_dependableoptionalIDependablepolicyDependableoptionalIDependablePolicyDependableoptionalIDependablePolicyDependableoptionalIDependable #
Dependable which allows depending on the policy change being applied.

Default: Required if statementAdded is true.

statementAddedbooleanstatement_addedboolstatementAddedBooleanStatementAddedboolStatementAdded*bool required #
Whether the statement was added to the identity's policies.