Class CreateHttpConnectionCommandProtected

Create a new HttpConnection.

Example

Use a bare-bones client and the command you need to make an API call.

import { EventsClient, CreateHttpConnectionCommand } from "@stedi/sdk-client-events"; // ES Modules import
// const { EventsClient, CreateHttpConnectionCommand } = require("@stedi/sdk-client-events"); // CommonJS import
const client = new EventsClient(config);
const input = { // CreateHttpConnectionInput
httpConnectionName: "STRING_VALUE", // required
idempotencyKey: "STRING_VALUE",
authorizationType: "BASIC" || "OAUTH_CLIENT_CREDENTIALS" || "API_KEY", // required
authorizationParameters: { // AuthorizationParameters
basicAuthParameters: { // BasicAuthParameters
username: "STRING_VALUE", // required
password: "STRING_VALUE", // required
},
apiKeyAuthParameters: { // ApiKeyAuthParameters
apiKeyName: "STRING_VALUE", // required
apiKeyValue: "STRING_VALUE", // required
},
oAuthParameters: { // OAuthParameters
authorizationEndpoint: "STRING_VALUE", // required
clientParameters: { // OAuthClientParameters
clientId: "STRING_VALUE", // required
clientSecret: "STRING_VALUE", // required
},
httpMethod: "GET" || "POST" || "PUT" || "PATCH" || "DELETE", // required
oAuthHttpParameters: { // HttpParameters
bodyParameters: [ // ParameterItems
{ // Parameter
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
headerParameters: [
{
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
queryStringParameters: [
{
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
},
},
invocationHttpParameters: {
bodyParameters: [
{
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
headerParameters: [
{
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
queryStringParameters: "<ParameterItems>",
},
},
};
const command = new CreateHttpConnectionCommand(input);
const response = await client.send(command);
// { // CreateHttpConnectionOutput
// httpConnectionName: "STRING_VALUE", // required
// resourceDetail: { // CreateResourceDetail
// idempotencyKey: "STRING_VALUE", // required
// },
// };

Param

CreateHttpConnectionCommandInput

Returns

CreateHttpConnectionCommandOutput

See

Throws

AccessDeniedException (client fault)

Throws

ProductUnavailableException (client fault)

Throws

ResourceAlreadyExistsException (client fault)

Throws

ResourceNotFoundException (client fault)

Throws

ResourceUnderChangeException (client fault)

Throws

ServiceException (server fault)

Throws

EventsServiceException

Base exception class for all service exceptions from Events service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Returns EndpointParameterInstructions