import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { EventBridgeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EventBridgeClient"; import type { CreateConnectionRequest, CreateConnectionResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateConnectionCommand}. */ export interface CreateConnectionCommandInput extends CreateConnectionRequest { } /** * @public * * The output of {@link CreateConnectionCommand}. */ export interface CreateConnectionCommandOutput extends CreateConnectionResponse, __MetadataBearer { } declare const CreateConnectionCommand_base: { new (input: CreateConnectionCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateConnectionCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Creates a connection. A connection defines the authorization type and credentials to use * for authorization with an API destination HTTP endpoint.

*

For more information, see Connections for endpoint targets in the Amazon EventBridge User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { EventBridgeClient, CreateConnectionCommand } from "@aws-sdk/client-eventbridge"; // ES Modules import * // const { EventBridgeClient, CreateConnectionCommand } = require("@aws-sdk/client-eventbridge"); // CommonJS import * // import type { EventBridgeClientConfig } from "@aws-sdk/client-eventbridge"; * const config = {}; // type is EventBridgeClientConfig * const client = new EventBridgeClient(config); * const input = { // CreateConnectionRequest * Name: "STRING_VALUE", // required * Description: "STRING_VALUE", * AuthorizationType: "BASIC" || "OAUTH_CLIENT_CREDENTIALS" || "API_KEY", // required * AuthParameters: { // CreateConnectionAuthRequestParameters * BasicAuthParameters: { // CreateConnectionBasicAuthRequestParameters * Username: "STRING_VALUE", // required * Password: "STRING_VALUE", // required * }, * OAuthParameters: { // CreateConnectionOAuthRequestParameters * ClientParameters: { // CreateConnectionOAuthClientRequestParameters * ClientID: "STRING_VALUE", // required * ClientSecret: "STRING_VALUE", // required * }, * AuthorizationEndpoint: "STRING_VALUE", // required * HttpMethod: "GET" || "POST" || "PUT", // required * OAuthHttpParameters: { // ConnectionHttpParameters * HeaderParameters: [ // ConnectionHeaderParametersList * { // ConnectionHeaderParameter * Key: "STRING_VALUE", * Value: "STRING_VALUE", * IsValueSecret: true || false, * }, * ], * QueryStringParameters: [ // ConnectionQueryStringParametersList * { // ConnectionQueryStringParameter * Key: "STRING_VALUE", * Value: "STRING_VALUE", * IsValueSecret: true || false, * }, * ], * BodyParameters: [ // ConnectionBodyParametersList * { // ConnectionBodyParameter * Key: "STRING_VALUE", * Value: "STRING_VALUE", * IsValueSecret: true || false, * }, * ], * }, * }, * ApiKeyAuthParameters: { // CreateConnectionApiKeyAuthRequestParameters * ApiKeyName: "STRING_VALUE", // required * ApiKeyValue: "STRING_VALUE", // required * }, * InvocationHttpParameters: { * HeaderParameters: [ * { * Key: "STRING_VALUE", * Value: "STRING_VALUE", * IsValueSecret: true || false, * }, * ], * QueryStringParameters: [ * { * Key: "STRING_VALUE", * Value: "STRING_VALUE", * IsValueSecret: true || false, * }, * ], * BodyParameters: [ * { * Key: "STRING_VALUE", * Value: "STRING_VALUE", * IsValueSecret: true || false, * }, * ], * }, * ConnectivityParameters: { // ConnectivityResourceParameters * ResourceParameters: { // ConnectivityResourceConfigurationArn * ResourceConfigurationArn: "STRING_VALUE", // required * }, * }, * }, * InvocationConnectivityParameters: { * ResourceParameters: { * ResourceConfigurationArn: "STRING_VALUE", // required * }, * }, * KmsKeyIdentifier: "STRING_VALUE", * }; * const command = new CreateConnectionCommand(input); * const response = await client.send(command); * // { // CreateConnectionResponse * // ConnectionArn: "STRING_VALUE", * // ConnectionState: "CREATING" || "UPDATING" || "DELETING" || "AUTHORIZED" || "DEAUTHORIZED" || "AUTHORIZING" || "DEAUTHORIZING" || "ACTIVE" || "FAILED_CONNECTIVITY", * // CreationTime: new Date("TIMESTAMP"), * // LastModifiedTime: new Date("TIMESTAMP"), * // }; * * ``` * * @param CreateConnectionCommandInput - {@link CreateConnectionCommandInput} * @returns {@link CreateConnectionCommandOutput} * @see {@link CreateConnectionCommandInput} for command's `input` shape. * @see {@link CreateConnectionCommandOutput} for command's `response` shape. * @see {@link EventBridgeClientResolvedConfig | config} for EventBridgeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

You do not have the necessary permissions for this action.

* * @throws {@link InternalException} (server fault) *

This exception occurs due to unexpected causes.

* * @throws {@link LimitExceededException} (client fault) *

The request failed because it attempted to create resource beyond the allowed service * quota.

* * @throws {@link ResourceAlreadyExistsException} (client fault) *

The resource you are trying to create already exists.

* * @throws {@link ResourceNotFoundException} (client fault) *

An entity that you specified does not exist.

* * @throws {@link ThrottlingException} (client fault) *

This request cannot be completed due to throttling issues.

* * @throws {@link EventBridgeServiceException} *

Base exception class for all service exceptions from EventBridge service.

* * * @public */ export declare class CreateConnectionCommand extends CreateConnectionCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateConnectionRequest; output: CreateConnectionResponse; }; sdk: { input: CreateConnectionCommandInput; output: CreateConnectionCommandOutput; }; }; }