# OAuthCredentialProviderProperty

The OAuth credential provider for the gateway target.

- Source: Generated at build time
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const oAuthCredentialProviderProperty: bedrockagentcore.CfnGatewayTarget.OAuthCredentialProviderProperty = {
  providerArn: 'providerArn',
  scopes: ['scopes'],

  // the properties below are optional
  customParameters: {
    customParametersKey: 'customParameters',
  },
  defaultReturnUrl: 'defaultReturnUrl',
  grantType: 'grantType',
};
```

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_bedrockagentcore as bedrockagentcore

o_auth_credential_provider_property = bedrockagentcore.CfnGatewayTarget.OAuthCredentialProviderProperty(
    provider_arn="providerArn",
    scopes=["scopes"],

    # the properties below are optional
    custom_parameters={
        "custom_parameters_key": "customParameters"
    },
    default_return_url="defaultReturnUrl",
    grant_type="grantType"
)
```

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.bedrockagentcore.*;

OAuthCredentialProviderProperty oAuthCredentialProviderProperty = OAuthCredentialProviderProperty.builder()
        .providerArn("providerArn")
        .scopes(List.of("scopes"))

        // the properties below are optional
        .customParameters(Map.of(
                "customParametersKey", "customParameters"))
        .defaultReturnUrl("defaultReturnUrl")
        .grantType("grantType")
        .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.BedrockAgentCore;

var oAuthCredentialProviderProperty = new OAuthCredentialProviderProperty {
    ProviderArn = "providerArn",
    Scopes = new [] { "scopes" },

    // the properties below are optional
    CustomParameters = new Dictionary<string, string> {
        { "customParametersKey", "customParameters" }
    },
    DefaultReturnUrl = "defaultReturnUrl",
    GrantType = "grantType"
};
```

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"

oAuthCredentialProviderProperty := &OAuthCredentialProviderProperty{
	ProviderArn: jsii.String("providerArn"),
	Scopes: []*string{
		jsii.String("scopes"),
	},

	// the properties below are optional
	CustomParameters: map[string]*string{
		"customParametersKey": jsii.String("customParameters"),
	},
	DefaultReturnUrl: jsii.String("defaultReturnUrl"),
	GrantType: jsii.String("grantType"),
}
```

## Properties

- `customParameters`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — The OAuth credential provider.

- `defaultReturnUrl`: string

- `grantType`: string

- `providerArn`: string (required) — The provider ARN for the gateway target.

- `scopes`: string[] (required) — The OAuth credential provider scopes.
