# IntegrationCredentials

Credentials used for AWS Service integrations.

Obtainable from: IntegrationCredentials.fromRole, IntegrationCredentials.useCallerIdentity

- Source: [`aws-apigatewayv2/lib/http/integration.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/integration.ts#L103)
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

TypeScript:

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

declare const roleRef: interfaces_iam.IRoleRef;
const integrationCredentials = apigatewayv2.IntegrationCredentials.fromRole(roleRef);
```

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_apigatewayv2 as apigatewayv2
from aws_cdk.interfaces import aws_iam as interfaces_iam

# role_ref: interfaces_iam.IRoleRef

integration_credentials = apigatewayv2.IntegrationCredentials.from_role(role_ref)
```

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.apigatewayv2.*;
import software.amazon.awscdk.interfaces.iam.*;

IRoleRef roleRef;

IntegrationCredentials integrationCredentials = IntegrationCredentials.fromRole(roleRef);
```

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.Apigatewayv2;
using Amazon.CDK.Interfaces.IAM;

IRoleRef roleRef;

var integrationCredentials = IntegrationCredentials.FromRole(roleRef);
```

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 "github.com/aws/aws-cdk-go/awscdk"

var roleRef IRoleRef

integrationCredentials := awscdk.Aws_apigatewayv2.IntegrationCredentials_FromRole(roleRef)
```

## Initializer

TypeScript:

```ts
new IntegrationCredentials()
```

Python:

```python
IntegrationCredentials()
```

Java:

```java
new IntegrationCredentials()
```

C# / .NET:

```csharp
new IntegrationCredentials()
```

Golang:

```go
NewIntegrationCredentials()
```

## Properties

- `credentialsArn`: string — The ARN of the credentials.

## Methods

- `fromRole(role: IRoleRef): IntegrationCredentials // chainable` (static) — Use the specified role for integration requests.

- `useCallerIdentity(): IntegrationCredentials // chainable` (static) — Use the calling user's identity to call the integration.
