1. Packages
  2. AWS Native
  3. API Docs
  4. events
  5. Connection

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi

aws-native.events.Connection

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi

    Resource Type definition for AWS::Events::Connection.

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var pagerDutyAPIKeyParam = config.Require("pagerDutyAPIKeyParam");
        var myConnection = new AwsNative.Events.Connection("myConnection", new()
        {
            AuthorizationType = AwsNative.Events.ConnectionAuthorizationType.ApiKey,
            Description = "Connection to PagerDuty API",
            AuthParameters = new AwsNative.Events.Inputs.ConnectionAuthParametersArgs
            {
                ApiKeyAuthParameters = new AwsNative.Events.Inputs.ConnectionApiKeyAuthParametersArgs
                {
                    ApiKeyName = "PagerDuty Authorization",
                    ApiKeyValue = pagerDutyAPIKeyParam,
                },
            },
        });
    
        var myApiDestination = new AwsNative.Events.ApiDestination("myApiDestination", new()
        {
            ConnectionArn = myConnection.Arn,
            Description = "API Destination to send events to PagerDuty",
            HttpMethod = AwsNative.Events.ApiDestinationHttpMethod.Post,
            InvocationEndpoint = "https://events.pagerduty.com/v2/enqueue",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/events"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		pagerDutyAPIKeyParam := cfg.Require("pagerDutyAPIKeyParam")
    		myConnection, err := events.NewConnection(ctx, "myConnection", &events.ConnectionArgs{
    			AuthorizationType: events.ConnectionAuthorizationTypeApiKey,
    			Description:       pulumi.String("Connection to PagerDuty API"),
    			AuthParameters: &events.ConnectionAuthParametersArgs{
    				ApiKeyAuthParameters: &events.ConnectionApiKeyAuthParametersArgs{
    					ApiKeyName:  pulumi.String("PagerDuty Authorization"),
    					ApiKeyValue: pulumi.String(pagerDutyAPIKeyParam),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = events.NewApiDestination(ctx, "myApiDestination", &events.ApiDestinationArgs{
    			ConnectionArn:      myConnection.Arn,
    			Description:        pulumi.String("API Destination to send events to PagerDuty"),
    			HttpMethod:         events.ApiDestinationHttpMethodPost,
    			InvocationEndpoint: pulumi.String("https://events.pagerduty.com/v2/enqueue"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    config = pulumi.Config()
    pager_duty_api_key_param = config.require("pagerDutyAPIKeyParam")
    my_connection = aws_native.events.Connection("myConnection",
        authorization_type=aws_native.events.ConnectionAuthorizationType.API_KEY,
        description="Connection to PagerDuty API",
        auth_parameters=aws_native.events.ConnectionAuthParametersArgs(
            api_key_auth_parameters=aws_native.events.ConnectionApiKeyAuthParametersArgs(
                api_key_name="PagerDuty Authorization",
                api_key_value=pager_duty_api_key_param,
            ),
        ))
    my_api_destination = aws_native.events.ApiDestination("myApiDestination",
        connection_arn=my_connection.arn,
        description="API Destination to send events to PagerDuty",
        http_method=aws_native.events.ApiDestinationHttpMethod.POST,
        invocation_endpoint="https://events.pagerduty.com/v2/enqueue")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const config = new pulumi.Config();
    const pagerDutyAPIKeyParam = config.require("pagerDutyAPIKeyParam");
    const myConnection = new aws_native.events.Connection("myConnection", {
        authorizationType: aws_native.events.ConnectionAuthorizationType.ApiKey,
        description: "Connection to PagerDuty API",
        authParameters: {
            apiKeyAuthParameters: {
                apiKeyName: "PagerDuty Authorization",
                apiKeyValue: pagerDutyAPIKeyParam,
            },
        },
    });
    const myApiDestination = new aws_native.events.ApiDestination("myApiDestination", {
        connectionArn: myConnection.arn,
        description: "API Destination to send events to PagerDuty",
        httpMethod: aws_native.events.ApiDestinationHttpMethod.Post,
        invocationEndpoint: "https://events.pagerduty.com/v2/enqueue",
    });
    

    Coming soon!

    Create Connection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Connection(name: string, args: ConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def Connection(resource_name: str,
                   args: ConnectionArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Connection(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   auth_parameters: Optional[ConnectionAuthParametersArgs] = None,
                   authorization_type: Optional[ConnectionAuthorizationType] = None,
                   description: Optional[str] = None,
                   name: Optional[str] = None)
    func NewConnection(ctx *Context, name string, args ConnectionArgs, opts ...ResourceOption) (*Connection, error)
    public Connection(string name, ConnectionArgs args, CustomResourceOptions? opts = null)
    public Connection(String name, ConnectionArgs args)
    public Connection(String name, ConnectionArgs args, CustomResourceOptions options)
    
    type: aws-native:events:Connection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const exampleconnectionResourceResourceFromEvents = new aws_native.events.Connection("exampleconnectionResourceResourceFromEvents", {
        authParameters: {
            apiKeyAuthParameters: {
                apiKeyName: "string",
                apiKeyValue: "string",
            },
            basicAuthParameters: {
                password: "string",
                username: "string",
            },
            invocationHttpParameters: {
                bodyParameters: [{
                    key: "string",
                    value: "string",
                    isValueSecret: false,
                }],
                headerParameters: [{
                    key: "string",
                    value: "string",
                    isValueSecret: false,
                }],
                queryStringParameters: [{
                    key: "string",
                    value: "string",
                    isValueSecret: false,
                }],
            },
            oAuthParameters: {
                authorizationEndpoint: "string",
                clientParameters: {
                    clientId: "string",
                    clientSecret: "string",
                },
                httpMethod: aws_native.events.ConnectionOAuthParametersHttpMethod.Get,
                oAuthHttpParameters: {
                    bodyParameters: [{
                        key: "string",
                        value: "string",
                        isValueSecret: false,
                    }],
                    headerParameters: [{
                        key: "string",
                        value: "string",
                        isValueSecret: false,
                    }],
                    queryStringParameters: [{
                        key: "string",
                        value: "string",
                        isValueSecret: false,
                    }],
                },
            },
        },
        authorizationType: aws_native.events.ConnectionAuthorizationType.ApiKey,
        description: "string",
        name: "string",
    });
    
    Coming soon!
    

    Connection Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Connection resource accepts the following input properties:

    AuthParameters ConnectionAuthParametersArgs
    AuthorizationType ConnectionAuthorizationType
    Description string
    Description of the connection.
    Name string
    Name of the connection.
    authParameters ConnectionAuthParameters
    authorizationType ConnectionAuthorizationType
    description String
    Description of the connection.
    name String
    Name of the connection.
    authParameters ConnectionAuthParameters
    authorizationType ConnectionAuthorizationType
    description string
    Description of the connection.
    name string
    Name of the connection.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Connection resource produces the following output properties:

    Arn string
    The arn of the connection resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretArn string
    The arn of the secrets manager secret created in the customer account.
    Arn string
    The arn of the connection resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretArn string
    The arn of the secrets manager secret created in the customer account.
    arn String
    The arn of the connection resource.
    id String
    The provider-assigned unique ID for this managed resource.
    secretArn String
    The arn of the secrets manager secret created in the customer account.
    arn string
    The arn of the connection resource.
    id string
    The provider-assigned unique ID for this managed resource.
    secretArn string
    The arn of the secrets manager secret created in the customer account.
    arn str
    The arn of the connection resource.
    id str
    The provider-assigned unique ID for this managed resource.
    secret_arn str
    The arn of the secrets manager secret created in the customer account.
    arn String
    The arn of the connection resource.
    id String
    The provider-assigned unique ID for this managed resource.
    secretArn String
    The arn of the secrets manager secret created in the customer account.

    Supporting Types

    ConnectionApiKeyAuthParameters, ConnectionApiKeyAuthParametersArgs

    ApiKeyName string
    ApiKeyValue string
    ApiKeyName string
    ApiKeyValue string
    apiKeyName String
    apiKeyValue String
    apiKeyName string
    apiKeyValue string
    apiKeyName String
    apiKeyValue String

    ConnectionAuthParameters, ConnectionAuthParametersArgs

    ConnectionAuthorizationType, ConnectionAuthorizationTypeArgs

    ApiKey
    API_KEY
    Basic
    BASIC
    OauthClientCredentials
    OAUTH_CLIENT_CREDENTIALS
    ConnectionAuthorizationTypeApiKey
    API_KEY
    ConnectionAuthorizationTypeBasic
    BASIC
    ConnectionAuthorizationTypeOauthClientCredentials
    OAUTH_CLIENT_CREDENTIALS
    ApiKey
    API_KEY
    Basic
    BASIC
    OauthClientCredentials
    OAUTH_CLIENT_CREDENTIALS
    ApiKey
    API_KEY
    Basic
    BASIC
    OauthClientCredentials
    OAUTH_CLIENT_CREDENTIALS
    API_KEY
    API_KEY
    BASIC
    BASIC
    OAUTH_CLIENT_CREDENTIALS
    OAUTH_CLIENT_CREDENTIALS
    "API_KEY"
    API_KEY
    "BASIC"
    BASIC
    "OAUTH_CLIENT_CREDENTIALS"
    OAUTH_CLIENT_CREDENTIALS

    ConnectionBasicAuthParameters, ConnectionBasicAuthParametersArgs

    Password string
    Username string
    Password string
    Username string
    password String
    username String
    password string
    username string
    password String
    username String

    ConnectionClientParameters, ConnectionClientParametersArgs

    ClientId string
    ClientSecret string
    ClientId string
    ClientSecret string
    clientId String
    clientSecret String
    clientId string
    clientSecret string
    clientId String
    clientSecret String

    ConnectionHttpParameters, ConnectionHttpParametersArgs

    ConnectionOAuthParameters, ConnectionOAuthParametersArgs

    ConnectionOAuthParametersHttpMethod, ConnectionOAuthParametersHttpMethodArgs

    Get
    GET
    Post
    POST
    Put
    PUT
    ConnectionOAuthParametersHttpMethodGet
    GET
    ConnectionOAuthParametersHttpMethodPost
    POST
    ConnectionOAuthParametersHttpMethodPut
    PUT
    Get
    GET
    Post
    POST
    Put
    PUT
    Get
    GET
    Post
    POST
    Put
    PUT
    GET
    GET
    POST
    POST
    PUT
    PUT
    "GET"
    GET
    "POST"
    POST
    "PUT"
    PUT

    ConnectionParameter, ConnectionParameterArgs

    Key string
    Value string
    IsValueSecret bool
    Key string
    Value string
    IsValueSecret bool
    key String
    value String
    isValueSecret Boolean
    key string
    value string
    isValueSecret boolean
    key String
    value String
    isValueSecret Boolean

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi