import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an EventBridge connection resource. * * > **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.cloudwatch.EventConnection("test", { * authParameters: { * apiKey: { * key: "x-signature", * value: "1234", * }, * }, * name: "ngrok-connection", * description: "A connection description", * authorizationType: "API_KEY", * }); * ``` * * ### Example Usage Basic Authorization * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.cloudwatch.EventConnection("test", { * authParameters: { * basic: { * username: "user", * password: "Pass1234!", * }, * }, * name: "ngrok-connection", * description: "A connection description", * authorizationType: "BASIC", * }); * ``` * * ### Example Usage OAuth Authorization * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.cloudwatch.EventConnection("test", { * authParameters: { * oauth: { * clientParameters: { * clientId: "1234567890", * clientSecret: "Pass1234!", * }, * oauthHttpParameters: { * bodies: [{ * key: "body-parameter-key", * value: "body-parameter-value", * isValueSecret: false, * }], * headers: [{ * key: "header-parameter-key", * value: "header-parameter-value", * isValueSecret: false, * }], * queryStrings: [{ * key: "query-string-parameter-key", * value: "query-string-parameter-value", * isValueSecret: false, * }], * }, * authorizationEndpoint: "https://auth.url.com/endpoint", * httpMethod: "GET", * }, * }, * name: "ngrok-connection", * description: "A connection description", * authorizationType: "OAUTH_CLIENT_CREDENTIALS", * }); * ``` * * ### Example Usage Invocation Http Parameters * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.cloudwatch.EventConnection("test", { * authParameters: { * basic: { * username: "user", * password: "Pass1234!", * }, * invocationHttpParameters: { * bodies: [ * { * key: "body-parameter-key", * value: "body-parameter-value", * isValueSecret: false, * }, * { * key: "body-parameter-key2", * value: "body-parameter-value2", * isValueSecret: true, * }, * ], * headers: [{ * key: "header-parameter-key", * value: "header-parameter-value", * isValueSecret: false, * }], * queryStrings: [{ * key: "query-string-parameter-key", * value: "query-string-parameter-value", * isValueSecret: false, * }], * }, * }, * name: "ngrok-connection", * description: "A connection description", * authorizationType: "BASIC", * }); * ``` * * ### Example Usage OAuth Authorization with Connectivity Parameters * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.cloudwatch.EventConnection("test", { * authParameters: { * connectivityParameters: { * resourceParameters: { * resourceConfigurationArn: "arn:aws:vpc-lattice:us-east-1:12345678910:resourceconfiguration/rcfg-12345678910", * }, * }, * oauth: { * clientParameters: { * clientId: "1234567890", * clientSecret: "Pass1234!", * }, * oauthHttpParameters: { * bodies: [{ * key: "grant_type", * value: "client_credentials", * isValueSecret: false, * }], * }, * authorizationEndpoint: "https://private-api.example.com/auth", * httpMethod: "POST", * }, * }, * name: "private-api-connection", * description: "A connection to a private API", * authorizationType: "OAUTH_CLIENT_CREDENTIALS", * }); * ``` * * ### Example Usage CMK Encryption * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getCallerIdentity({}); * const currentGetPartition = aws.getPartition({}); * const test = new aws.kms.Key("test", { * deletionWindowInDays: 7, * policy: JSON.stringify({ * Version: "2012-10-17", * Id: "key-policy-example", * Statement: [ * { * Sid: "Enable IAM User Permissions", * Effect: "Allow", * Principal: { * AWS: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) => `arn:${currentGetPartition.partition}:iam::${current.accountId}:root`), * }, * Action: "kms:*", * Resource: "*", * }, * { * Sid: "Allow use of the key", * Effect: "Allow", * Principal: { * AWS: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) => `arn:${currentGetPartition.partition}:iam::${current.accountId}:root`), * }, * Action: [ * "kms:DescribeKey", * "kms:Decrypt", * "kms:GenerateDataKey", * ], * Resource: "*", * Condition: { * StringLike: { * "kms:ViaService": "secretsmanager.*.amazonaws.com", * "kms:EncryptionContext:SecretARN": ["arn:aws:secretsmanager:*:*:secret:events!connection/*"], * }, * }, * }, * ], * }), * tags: { * EventBridgeApiDestinations: "true", * }, * }); * const testEventConnection = new aws.cloudwatch.EventConnection("test", { * authParameters: { * basic: { * username: "user", * password: "Pass1234!", * }, * }, * name: "ngrok-connection", * description: "A connection description", * authorizationType: "BASIC", * kmsKeyIdentifier: example.id, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `name` (String) Name of the connection. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Connections using `name`. For example: * * ```sh * $ pulumi import aws:cloudwatch/eventConnection:EventConnection example example-connection * ``` */ export declare class EventConnection extends pulumi.CustomResource { /** * Get an existing EventConnection resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: EventConnectionState, opts?: pulumi.CustomResourceOptions): EventConnection; /** * Returns true if the given object is an instance of EventConnection. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is EventConnection; /** * ARN of the connection. */ readonly arn: pulumi.Output; /** * Parameters used for authorization. A maximum of 1 are allowed. Documented below. */ readonly authParameters: pulumi.Output; /** * Type of authorization to use for the connection. One of `API_KEY`,`BASIC`,`OAUTH_CLIENT_CREDENTIALS`. */ readonly authorizationType: pulumi.Output; /** * Description for the connection. Maximum of 512 characters. */ readonly description: pulumi.Output; /** * Parameters to use for invoking a private API. Documented below. */ readonly invocationConnectivityParameters: pulumi.Output; /** * Identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key ARN, KeyId, key alias, or key alias ARN. */ readonly kmsKeyIdentifier: pulumi.Output; /** * The name for the connection. Maximum of 64 characters consisting of numbers, lower/upper case letters, .,-,_. */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * ARN of the secret created from the authorization parameters specified for the connection. */ readonly secretArn: pulumi.Output; /** * Create a EventConnection resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: EventConnectionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EventConnection resources. */ export interface EventConnectionState { /** * ARN of the connection. */ arn?: pulumi.Input; /** * Parameters used for authorization. A maximum of 1 are allowed. Documented below. */ authParameters?: pulumi.Input; /** * Type of authorization to use for the connection. One of `API_KEY`,`BASIC`,`OAUTH_CLIENT_CREDENTIALS`. */ authorizationType?: pulumi.Input; /** * Description for the connection. Maximum of 512 characters. */ description?: pulumi.Input; /** * Parameters to use for invoking a private API. Documented below. */ invocationConnectivityParameters?: pulumi.Input; /** * Identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key ARN, KeyId, key alias, or key alias ARN. */ kmsKeyIdentifier?: pulumi.Input; /** * The name for the connection. Maximum of 64 characters consisting of numbers, lower/upper case letters, .,-,_. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * ARN of the secret created from the authorization parameters specified for the connection. */ secretArn?: pulumi.Input; } /** * The set of arguments for constructing a EventConnection resource. */ export interface EventConnectionArgs { /** * Parameters used for authorization. A maximum of 1 are allowed. Documented below. */ authParameters: pulumi.Input; /** * Type of authorization to use for the connection. One of `API_KEY`,`BASIC`,`OAUTH_CLIENT_CREDENTIALS`. */ authorizationType: pulumi.Input; /** * Description for the connection. Maximum of 512 characters. */ description?: pulumi.Input; /** * Parameters to use for invoking a private API. Documented below. */ invocationConnectivityParameters?: pulumi.Input; /** * Identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key ARN, KeyId, key alias, or key alias ARN. */ kmsKeyIdentifier?: pulumi.Input; /** * The name for the connection. Maximum of 64 characters consisting of numbers, lower/upper case letters, .,-,_. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } //# sourceMappingURL=eventConnection.d.ts.map