# AddToPrincipalPolicyResult

Result of calling `addToPrincipalPolicy`.

Returned by: [IPrincipal.addToPrincipalPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IPrincipal.html#addtoprincipalpolicy)

- Source: [`aws-iam/lib/principals.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-iam/lib/principals.ts#L132)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
};
```

Golang:

```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

- `policyDependable`: [IDependable](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IDependable.html) — Dependable which allows depending on the policy change being applied.

  **Default:** Required if `statementAdded` is true.

- `statementAdded`: boolean (required) — Whether the statement was added to the identity's policies.
