AwsEventbridgeConnection
Creates an AWS EventBridge Connection for use with API Destinations.
Remarks
Wraps aws.cloudwatch.EventConnection. The connection name is derived deterministically:
- Pulumi logical name:
${environmentCode}-${projectHash}-eventbridge-connection-${sanitisedName}fromargs.name. - AWS provider name: built from
args.namethrough the naming-style prefix pattern.
Supported authorization types: BASIC, API_KEY, OAUTH_CLIENT_CREDENTIALS. Credentials and secret values are stored and managed by AWS Secrets Manager.
Naming:
- Root type
${namespace}:aws:AwsEventbridgeConnectionhas capabilityeventbridge-connectionand SHARED identityargs.name; target${env}-${projectHash}-eventbridge-connection-${sanitiseNamePart(args.name)}. - Child
aws:cloudwatch/eventConnection:EventConnectionhas tuple[args.name]; target${env}-${projectHash}-${sanitiseNamePart(args.name)}. - Provider
nameusesargs.namewithstackAndPurpose, yielding${env}-${projectHash}-${purpose}; purpose is camelCase and limited to 51 characters by the component for AWS's 64-character limit.
Example
const conn = new AwsEventbridgeConnection({
name: 'myApi',
authorizationType: 'BASIC',
authParameters: {
basic: { username: 'user', password: 'Pass1234!' },
invocationHttpParameters: {
headers: [{ key: 'x-api-version', value: '2024-01-01' }],
},
},
description: 'Connection to my API',
});
export const connArn = conn.arn;
export const secretArn = conn.secretArn;Constructors
new AwsEventbridgeConnection(
args: AwsEventbridgeConnectionArgs,
options?: ComponentResourceOptions,
): AwsEventbridgeConnection
Parameters
args(AwsEventbridgeConnectionArgs) — Component inputs;args.nameis the shared provider-purpose and logical-root identity.options(ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.
Returns
AwsEventbridgeConnection
Hierarchy
ComponentResourceAwsEventbridgeConnection
Properties
arn: Output<string>
The ARN of the connection.
connection: EventConnection
The underlying AWS EventBridge connection resource.
secretArn: Output<string>
The ARN of the Secrets Manager secret holding the connection credentials.
urn: Output<string>
Inherited from urn
The stable logical URN used to distinctly address a resource, both before and after deployments.
Methods
getData(): Promise<any>
Inherited from getData
Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.
Returns
Promise<any>
getProvider(moduleMember: string): ProviderResource | undefined
Inherited from getProvider
Returns the provider for the given module member, if one exists.
Parameters
moduleMember(string)
Returns
ProviderResource | undefined
initialize(
args: Inputs,
opts?: ComponentResourceOptions,
name?: string,
type?: string,
): Promise<any>
Inherited from initialize
Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.
Parameters
args(Inputs)opts(ComponentResourceOptions, optional)name(string, optional)type(string, optional)
Returns
Promise<any>
registerOutputs(
outputs?: Inputs | Promise<Inputs> | Output<Inputs>,
): void
Inherited from registerOutputs
Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.
Parameters
outputs(Inputs | Promise<Inputs> | Output<Inputs>, optional)
Returns
void
Static Methods
isInstance(obj: any): obj is ComponentResource<any>
Inherited from isInstance
Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
Parameters
obj(any)
Returns
obj is ComponentResource<any>