Skip to content
v2.277.0

CfnConnectionProps Struct ​

Properties for defining a CfnConnection.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_events as events } from 'aws-cdk-lib';
const cfnConnectionProps: events.CfnConnectionProps = {
  authorizationType: 'authorizationType',
  authParameters: {
    apiKeyAuthParameters: {
      apiKeyName: 'apiKeyName',
      apiKeyValue: 'apiKeyValue',
    },
    basicAuthParameters: {
      password: 'password',
      username: 'username',
    },
    connectivityParameters: {
      resourceParameters: {
        resourceConfigurationArn: 'resourceConfigurationArn',

        // the properties below are optional
        resourceAssociationArn: 'resourceAssociationArn',
      },
    },
    invocationHttpParameters: {
      bodyParameters: [{
        key: 'key',
        value: 'value',

        // the properties below are optional
        isValueSecret: false,
      }],
      headerParameters: [{
        key: 'key',
        value: 'value',

        // the properties below are optional
        isValueSecret: false,
      }],
      queryStringParameters: [{
        key: 'key',
        value: 'value',

        // the properties below are optional
        isValueSecret: false,
      }],
    },
    oAuthParameters: {
      authorizationEndpoint: 'authorizationEndpoint',
      clientParameters: {
        clientId: 'clientId',
        clientSecret: 'clientSecret',
      },
      httpMethod: 'httpMethod',

      // the properties below are optional
      oAuthHttpParameters: {
        bodyParameters: [{
          key: 'key',
          value: 'value',

          // the properties below are optional
          isValueSecret: false,
        }],
        headerParameters: [{
          key: 'key',
          value: 'value',

          // the properties below are optional
          isValueSecret: false,
        }],
        queryStringParameters: [{
          key: 'key',
          value: 'value',

          // the properties below are optional
          isValueSecret: false,
        }],
      },
    },
  },
  description: 'description',
  invocationConnectivityParameters: {
    resourceParameters: {
      resourceConfigurationArn: 'resourceConfigurationArn',

      // the properties below are optional
      resourceAssociationArn: 'resourceAssociationArn',
    },
  },
  kmsKeyIdentifier: 'kmsKeyIdentifier',
  name: 'name',
};
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_events as events

cfn_connection_props = events.CfnConnectionProps(
    authorization_type="authorizationType",
    auth_parameters=events.CfnConnection.AuthParametersProperty(
        api_key_auth_parameters=events.CfnConnection.ApiKeyAuthParametersProperty(
            api_key_name="apiKeyName",
            api_key_value="apiKeyValue"
        ),
        basic_auth_parameters=events.CfnConnection.BasicAuthParametersProperty(
            password="password",
            username="username"
        ),
        connectivity_parameters=events.CfnConnection.ConnectivityParametersProperty(
            resource_parameters=events.CfnConnection.ResourceParametersProperty(
                resource_configuration_arn="resourceConfigurationArn",

                # the properties below are optional
                resource_association_arn="resourceAssociationArn"
            )
        ),
        invocation_http_parameters=events.CfnConnection.ConnectionHttpParametersProperty(
            body_parameters=[events.CfnConnection.ParameterProperty(
                key="key",
                value="value",

                # the properties below are optional
                is_value_secret=False
            )],
            header_parameters=[events.CfnConnection.ParameterProperty(
                key="key",
                value="value",

                # the properties below are optional
                is_value_secret=False
            )],
            query_string_parameters=[events.CfnConnection.ParameterProperty(
                key="key",
                value="value",

                # the properties below are optional
                is_value_secret=False
            )]
        ),
        o_auth_parameters=events.CfnConnection.OAuthParametersProperty(
            authorization_endpoint="authorizationEndpoint",
            client_parameters=events.CfnConnection.ClientParametersProperty(
                client_id="clientId",
                client_secret="clientSecret"
            ),
            http_method="httpMethod",

            # the properties below are optional
            o_auth_http_parameters=events.CfnConnection.ConnectionHttpParametersProperty(
                body_parameters=[events.CfnConnection.ParameterProperty(
                    key="key",
                    value="value",

                    # the properties below are optional
                    is_value_secret=False
                )],
                header_parameters=[events.CfnConnection.ParameterProperty(
                    key="key",
                    value="value",

                    # the properties below are optional
                    is_value_secret=False
                )],
                query_string_parameters=[events.CfnConnection.ParameterProperty(
                    key="key",
                    value="value",

                    # the properties below are optional
                    is_value_secret=False
                )]
            )
        )
    ),
    description="description",
    invocation_connectivity_parameters=events.CfnConnection.InvocationConnectivityParametersProperty(
        resource_parameters=events.CfnConnection.ResourceParametersProperty(
            resource_configuration_arn="resourceConfigurationArn",

            # the properties below are optional
            resource_association_arn="resourceAssociationArn"
        )
    ),
    kms_key_identifier="kmsKeyIdentifier",
    name="name"
)
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.events.*;

CfnConnectionProps cfnConnectionProps = CfnConnectionProps.builder()
        .authorizationType("authorizationType")
        .authParameters(AuthParametersProperty.builder()
                .apiKeyAuthParameters(ApiKeyAuthParametersProperty.builder()
                        .apiKeyName("apiKeyName")
                        .apiKeyValue("apiKeyValue")
                        .build())
                .basicAuthParameters(BasicAuthParametersProperty.builder()
                        .password("password")
                        .username("username")
                        .build())
                .connectivityParameters(ConnectivityParametersProperty.builder()
                        .resourceParameters(ResourceParametersProperty.builder()
                                .resourceConfigurationArn("resourceConfigurationArn")

                                // the properties below are optional
                                .resourceAssociationArn("resourceAssociationArn")
                                .build())
                        .build())
                .invocationHttpParameters(ConnectionHttpParametersProperty.builder()
                        .bodyParameters(List.of(ParameterProperty.builder()
                                .key("key")
                                .value("value")

                                // the properties below are optional
                                .isValueSecret(false)
                                .build()))
                        .headerParameters(List.of(ParameterProperty.builder()
                                .key("key")
                                .value("value")

                                // the properties below are optional
                                .isValueSecret(false)
                                .build()))
                        .queryStringParameters(List.of(ParameterProperty.builder()
                                .key("key")
                                .value("value")

                                // the properties below are optional
                                .isValueSecret(false)
                                .build()))
                        .build())
                .oAuthParameters(OAuthParametersProperty.builder()
                        .authorizationEndpoint("authorizationEndpoint")
                        .clientParameters(ClientParametersProperty.builder()
                                .clientId("clientId")
                                .clientSecret("clientSecret")
                                .build())
                        .httpMethod("httpMethod")

                        // the properties below are optional
                        .oAuthHttpParameters(ConnectionHttpParametersProperty.builder()
                                .bodyParameters(List.of(ParameterProperty.builder()
                                        .key("key")
                                        .value("value")

                                        // the properties below are optional
                                        .isValueSecret(false)
                                        .build()))
                                .headerParameters(List.of(ParameterProperty.builder()
                                        .key("key")
                                        .value("value")

                                        // the properties below are optional
                                        .isValueSecret(false)
                                        .build()))
                                .queryStringParameters(List.of(ParameterProperty.builder()
                                        .key("key")
                                        .value("value")

                                        // the properties below are optional
                                        .isValueSecret(false)
                                        .build()))
                                .build())
                        .build())
                .build())
        .description("description")
        .invocationConnectivityParameters(InvocationConnectivityParametersProperty.builder()
                .resourceParameters(ResourceParametersProperty.builder()
                        .resourceConfigurationArn("resourceConfigurationArn")

                        // the properties below are optional
                        .resourceAssociationArn("resourceAssociationArn")
                        .build())
                .build())
        .kmsKeyIdentifier("kmsKeyIdentifier")
        .name("name")
        .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.Events;

var cfnConnectionProps = new CfnConnectionProps {
    AuthorizationType = "authorizationType",
    AuthParameters = new AuthParametersProperty {
        ApiKeyAuthParameters = new ApiKeyAuthParametersProperty {
            ApiKeyName = "apiKeyName",
            ApiKeyValue = "apiKeyValue"
        },
        BasicAuthParameters = new BasicAuthParametersProperty {
            Password = "password",
            Username = "username"
        },
        ConnectivityParameters = new ConnectivityParametersProperty {
            ResourceParameters = new ResourceParametersProperty {
                ResourceConfigurationArn = "resourceConfigurationArn",

                // the properties below are optional
                ResourceAssociationArn = "resourceAssociationArn"
            }
        },
        InvocationHttpParameters = new ConnectionHttpParametersProperty {
            BodyParameters = new [] { new ParameterProperty {
                Key = "key",
                Value = "value",

                // the properties below are optional
                IsValueSecret = false
            } },
            HeaderParameters = new [] { new ParameterProperty {
                Key = "key",
                Value = "value",

                // the properties below are optional
                IsValueSecret = false
            } },
            QueryStringParameters = new [] { new ParameterProperty {
                Key = "key",
                Value = "value",

                // the properties below are optional
                IsValueSecret = false
            } }
        },
        OAuthParameters = new OAuthParametersProperty {
            AuthorizationEndpoint = "authorizationEndpoint",
            ClientParameters = new ClientParametersProperty {
                ClientId = "clientId",
                ClientSecret = "clientSecret"
            },
            HttpMethod = "httpMethod",

            // the properties below are optional
            OAuthHttpParameters = new ConnectionHttpParametersProperty {
                BodyParameters = new [] { new ParameterProperty {
                    Key = "key",
                    Value = "value",

                    // the properties below are optional
                    IsValueSecret = false
                } },
                HeaderParameters = new [] { new ParameterProperty {
                    Key = "key",
                    Value = "value",

                    // the properties below are optional
                    IsValueSecret = false
                } },
                QueryStringParameters = new [] { new ParameterProperty {
                    Key = "key",
                    Value = "value",

                    // the properties below are optional
                    IsValueSecret = false
                } }
            }
        }
    },
    Description = "description",
    InvocationConnectivityParameters = new InvocationConnectivityParametersProperty {
        ResourceParameters = new ResourceParametersProperty {
            ResourceConfigurationArn = "resourceConfigurationArn",

            // the properties below are optional
            ResourceAssociationArn = "resourceAssociationArn"
        }
    },
    KmsKeyIdentifier = "kmsKeyIdentifier",
    Name = "name"
};
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"

cfnConnectionProps := &CfnConnectionProps{
	AuthorizationType: jsii.String("authorizationType"),
	AuthParameters: &AuthParametersProperty{
		ApiKeyAuthParameters: &ApiKeyAuthParametersProperty{
			ApiKeyName: jsii.String("apiKeyName"),
			ApiKeyValue: jsii.String("apiKeyValue"),
		},
		BasicAuthParameters: &BasicAuthParametersProperty{
			Password: jsii.String("password"),
			Username: jsii.String("username"),
		},
		ConnectivityParameters: &ConnectivityParametersProperty{
			ResourceParameters: &ResourceParametersProperty{
				ResourceConfigurationArn: jsii.String("resourceConfigurationArn"),

				// the properties below are optional
				ResourceAssociationArn: jsii.String("resourceAssociationArn"),
			},
		},
		InvocationHttpParameters: &ConnectionHttpParametersProperty{
			BodyParameters: []interface{}{
				&ParameterProperty{
					Key: jsii.String("key"),
					Value: jsii.String("value"),

					// the properties below are optional
					IsValueSecret: jsii.Boolean(false),
				},
			},
			HeaderParameters: []interface{}{
				&ParameterProperty{
					Key: jsii.String("key"),
					Value: jsii.String("value"),

					// the properties below are optional
					IsValueSecret: jsii.Boolean(false),
				},
			},
			QueryStringParameters: []interface{}{
				&ParameterProperty{
					Key: jsii.String("key"),
					Value: jsii.String("value"),

					// the properties below are optional
					IsValueSecret: jsii.Boolean(false),
				},
			},
		},
		OAuthParameters: &OAuthParametersProperty{
			AuthorizationEndpoint: jsii.String("authorizationEndpoint"),
			ClientParameters: &ClientParametersProperty{
				ClientId: jsii.String("clientId"),
				ClientSecret: jsii.String("clientSecret"),
			},
			HttpMethod: jsii.String("httpMethod"),

			// the properties below are optional
			OAuthHttpParameters: &ConnectionHttpParametersProperty{
				BodyParameters: []interface{}{
					&ParameterProperty{
						Key: jsii.String("key"),
						Value: jsii.String("value"),

						// the properties below are optional
						IsValueSecret: jsii.Boolean(false),
					},
				},
				HeaderParameters: []interface{}{
					&ParameterProperty{
						Key: jsii.String("key"),
						Value: jsii.String("value"),

						// the properties below are optional
						IsValueSecret: jsii.Boolean(false),
					},
				},
				QueryStringParameters: []interface{}{
					&ParameterProperty{
						Key: jsii.String("key"),
						Value: jsii.String("value"),

						// the properties below are optional
						IsValueSecret: jsii.Boolean(false),
					},
				},
			},
		},
	},
	Description: jsii.String("description"),
	InvocationConnectivityParameters: &InvocationConnectivityParametersProperty{
		ResourceParameters: &ResourceParametersProperty{
			ResourceConfigurationArn: jsii.String("resourceConfigurationArn"),

			// the properties below are optional
			ResourceAssociationArn: jsii.String("resourceAssociationArn"),
		},
	},
	KmsKeyIdentifier: jsii.String("kmsKeyIdentifier"),
	Name: jsii.String("name"),
}

Properties ​

authorizationTypeoptionalstringauthorization_typeoptionalstrauthorizationTypeoptionalStringAuthorizationTypeoptionalstringAuthorizationTypeoptional*string#
The type of authorization to use for the connection.

OAUTH tokens are refreshed when a 401 or 407 response is returned.

authParametersoptionalIResolvable | CfnConnection.AuthParametersPropertyauth_parametersoptionaltyping.Union[IResolvable, AuthParametersProperty]authParametersoptionalIResolvableAuthParametersoptionalIResolvableAuthParametersoptionalinterface{}#
The authorization parameters to use to authorize with the endpoint.

You must include only authorization parameters for the AuthorizationType you specify.

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
A description for the connection to create.
invocationConnectivityParametersoptionalIResolvable | CfnConnection.InvocationConnectivityParametersPropertyinvocation_connectivity_parametersoptionaltyping.Union[IResolvable, InvocationConnectivityParametersProperty]invocationConnectivityParametersoptionalIResolvableInvocationConnectivityParametersoptionalIResolvableInvocationConnectivityParametersoptionalinterface{}#
For connections to private APIs, the parameters to use for invoking the API.

For more information, see Connecting to private APIs in the Amazon EventBridge User Guide .

kmsKeyIdentifieroptionalstringkms_key_identifieroptionalstrkmsKeyIdentifieroptionalStringKmsKeyIdentifieroptionalstringKmsKeyIdentifieroptional*string#
The identifier of the AWS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection.
notes

The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.

If you do not specify a customer managed key identifier, EventBridge uses an AWS owned key to encrypt the connection.

For more information, see Identify and view keys in the AWS Key Management Service Developer Guide .

nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string#
The name for the connection to create.