Skip to content
v2.278.0

GatewayTargetOpenApiProps Struct ​

Properties for creating an OpenAPI-based Gateway Target.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';

declare const apiSchema: bedrock_agentcore_alpha.ApiSchema;
declare const credentialProviderConfig: bedrock_agentcore_alpha.ICredentialProviderConfig;
declare const gateway: bedrock_agentcore_alpha.Gateway;
const gatewayTargetOpenApiProps: bedrock_agentcore_alpha.GatewayTargetOpenApiProps = {
  apiSchema: apiSchema,
  gateway: gateway,

  // the properties below are optional
  credentialProviderConfigurations: [credentialProviderConfig],
  description: 'description',
  gatewayTargetName: 'gatewayTargetName',
  validateOpenApiSchema: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha

# api_schema: bedrock_agentcore_alpha.ApiSchema
# credential_provider_config: bedrock_agentcore_alpha.ICredentialProviderConfig
# gateway: bedrock_agentcore_alpha.Gateway

gateway_target_open_api_props = bedrock_agentcore_alpha.GatewayTargetOpenApiProps(
    api_schema=api_schema,
    gateway=gateway,

    # the properties below are optional
    credential_provider_configurations=[credential_provider_config],
    description="description",
    gateway_target_name="gatewayTargetName",
    validate_open_api_schema=False
)
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.bedrock.agentcore.alpha.*;

ApiSchema apiSchema;
ICredentialProviderConfig credentialProviderConfig;
Gateway gateway;

GatewayTargetOpenApiProps gatewayTargetOpenApiProps = GatewayTargetOpenApiProps.builder()
        .apiSchema(apiSchema)
        .gateway(gateway)

        // the properties below are optional
        .credentialProviderConfigurations(List.of(credentialProviderConfig))
        .description("description")
        .gatewayTargetName("gatewayTargetName")
        .validateOpenApiSchema(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;

ApiSchema apiSchema;
ICredentialProviderConfig credentialProviderConfig;
Gateway gateway;

var gatewayTargetOpenApiProps = new GatewayTargetOpenApiProps {
    ApiSchema = apiSchema,
    Gateway = gateway,

    // the properties below are optional
    CredentialProviderConfigurations = new [] { credentialProviderConfig },
    Description = "description",
    GatewayTargetName = "gatewayTargetName",
    ValidateOpenApiSchema = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"

var apiSchema ApiSchema
var credentialProviderConfig ICredentialProviderConfig
var gateway Gateway

gatewayTargetOpenApiProps := &GatewayTargetOpenApiProps{
	ApiSchema: apiSchema,
	Gateway: gateway,

	// the properties below are optional
	CredentialProviderConfigurations: []ICredentialProviderConfig{
		credentialProviderConfig,
	},
	Description: jsii.String("description"),
	GatewayTargetName: jsii.String("gatewayTargetName"),
	ValidateOpenApiSchema: jsii.Boolean(false),
}

Properties ​

apiSchemaApiSchemaapi_schemaApiSchemaapiSchemaApiSchemaApiSchemaApiSchemaApiSchemaApiSchema required #
The OpenAPI schema defining the API.
credentialProviderConfigurationsoptionalICredentialProviderConfig[]credential_provider_configurationsoptionaltyping.List[ICredentialProviderConfig]credentialProviderConfigurationsoptionalList<ICredentialProviderConfig>CredentialProviderConfigurationsoptionalICredentialProviderConfig[]CredentialProviderConfigurationsoptional*[]ICredentialProviderConfig #
Credential providers for authentication OpenAPI targets support API key and OAuth authentication (not IAM).

Default: If not provided, defaults to IAM role which will fail at runtime

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
Optional description for the gateway target The description can have up to 200 characters.

Default: No description

gatewayIGatewaygatewayIGatewaygatewayIGatewayGatewayIGatewayGatewayIGateway required #
The gateway this target belongs to.
gatewayTargetNameoptionalstringgateway_target_nameoptionalstrgatewayTargetNameoptionalStringGatewayTargetNameoptionalstringGatewayTargetNameoptional*string #
The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.

Default: auto generate

validateOpenApiSchemaoptionalbooleanvalidate_open_api_schemaoptionalboolvalidateOpenApiSchemaoptionalBooleanValidateOpenApiSchemaoptionalboolValidateOpenApiSchemaoptional*bool = true #
Whether to validate the OpenAPI schema (only applies to inline schemas) Note: Validation is only performed for inline schemas during CDK synthesis.

S3 and asset-based schemas cannot be validated at synthesis time.