1. Packages
  2. SignalFx
  3. API Docs
  4. aws
  5. TokenIntegration
SignalFx v7.2.1 published on Tuesday, Sep 17, 2024 by Pulumi

signalfx.aws.TokenIntegration

Explore with Pulumi AI

signalfx logo
SignalFx v7.2.1 published on Tuesday, Sep 17, 2024 by Pulumi

    Splunk Observability AWS CloudWatch integrations using security tokens. For help with this integration see Connect to AWS CloudWatch.

    NOTE When managing integrations, use a session token of an administrator to authenticate the Splunk Observabilit Cloud provider. See Operations that require a session token for an administrator.

    WARNING This resource implements a part of a workflow. You must use it with signalfx.aws.Integration.

    Example

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as signalfx from "@pulumi/signalfx";
    
    const awsMyteamToken = new signalfx.aws.TokenIntegration("aws_myteam_token", {name: "My AWS integration"});
    // Make yourself an AWS IAM role here
    const awsSfxRole = new aws.index.IamRole("aws_sfx_role", {});
    const awsMyteam = new signalfx.aws.Integration("aws_myteam", {
        enabled: true,
        integrationId: awsMyteamToken.id,
        token: "put_your_token_here",
        key: "put_your_key_here",
        regions: ["us-east-1"],
        pollRate: 300,
        importCloudWatch: true,
        enableAwsUsage: true,
        customNamespaceSyncRules: [{
            defaultAction: "Exclude",
            filterAction: "Include",
            filterSource: "filter('code', '200')",
            namespace: "my-custom-namespace",
        }],
        namespaceSyncRules: [{
            defaultAction: "Exclude",
            filterAction: "Include",
            filterSource: "filter('code', '200')",
            namespace: "AWS/EC2",
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_signalfx as signalfx
    
    aws_myteam_token = signalfx.aws.TokenIntegration("aws_myteam_token", name="My AWS integration")
    # Make yourself an AWS IAM role here
    aws_sfx_role = aws.index.IamRole("aws_sfx_role")
    aws_myteam = signalfx.aws.Integration("aws_myteam",
        enabled=True,
        integration_id=aws_myteam_token.id,
        token="put_your_token_here",
        key="put_your_key_here",
        regions=["us-east-1"],
        poll_rate=300,
        import_cloud_watch=True,
        enable_aws_usage=True,
        custom_namespace_sync_rules=[{
            "default_action": "Exclude",
            "filter_action": "Include",
            "filter_source": "filter('code', '200')",
            "namespace": "my-custom-namespace",
        }],
        namespace_sync_rules=[{
            "default_action": "Exclude",
            "filter_action": "Include",
            "filter_source": "filter('code', '200')",
            "namespace": "AWS/EC2",
        }])
    
    package main
    
    import (
    	goaws "github.com/pulumi/pulumi-aws/sdk/v4/go/aws"
    	"github.com/pulumi/pulumi-signalfx/sdk/v7/go/signalfx/aws"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		awsMyteamToken, err := aws.NewTokenIntegration(ctx, "aws_myteam_token", &aws.TokenIntegrationArgs{
    			Name: pulumi.String("My AWS integration"),
    		})
    		if err != nil {
    			return err
    		}
    		// Make yourself an AWS IAM role here
    		_, err = goaws.NewIamRole(ctx, "aws_sfx_role", nil)
    		if err != nil {
    			return err
    		}
    		_, err = aws.NewIntegration(ctx, "aws_myteam", &aws.IntegrationArgs{
    			Enabled:       pulumi.Bool(true),
    			IntegrationId: awsMyteamToken.ID(),
    			Token:         pulumi.String("put_your_token_here"),
    			Key:           pulumi.String("put_your_key_here"),
    			Regions: pulumi.StringArray{
    				pulumi.String("us-east-1"),
    			},
    			PollRate:         pulumi.Int(300),
    			ImportCloudWatch: pulumi.Bool(true),
    			EnableAwsUsage:   pulumi.Bool(true),
    			CustomNamespaceSyncRules: aws.IntegrationCustomNamespaceSyncRuleArray{
    				&aws.IntegrationCustomNamespaceSyncRuleArgs{
    					DefaultAction: pulumi.String("Exclude"),
    					FilterAction:  pulumi.String("Include"),
    					FilterSource:  pulumi.String("filter('code', '200')"),
    					Namespace:     pulumi.String("my-custom-namespace"),
    				},
    			},
    			NamespaceSyncRules: aws.IntegrationNamespaceSyncRuleArray{
    				&aws.IntegrationNamespaceSyncRuleArgs{
    					DefaultAction: pulumi.String("Exclude"),
    					FilterAction:  pulumi.String("Include"),
    					FilterSource:  pulumi.String("filter('code', '200')"),
    					Namespace:     pulumi.String("AWS/EC2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using SignalFx = Pulumi.SignalFx;
    
    return await Deployment.RunAsync(() => 
    {
        var awsMyteamToken = new SignalFx.Aws.TokenIntegration("aws_myteam_token", new()
        {
            Name = "My AWS integration",
        });
    
        // Make yourself an AWS IAM role here
        var awsSfxRole = new Aws.Index.IamRole("aws_sfx_role");
    
        var awsMyteam = new SignalFx.Aws.Integration("aws_myteam", new()
        {
            Enabled = true,
            IntegrationId = awsMyteamToken.Id,
            Token = "put_your_token_here",
            Key = "put_your_key_here",
            Regions = new[]
            {
                "us-east-1",
            },
            PollRate = 300,
            ImportCloudWatch = true,
            EnableAwsUsage = true,
            CustomNamespaceSyncRules = new[]
            {
                new SignalFx.Aws.Inputs.IntegrationCustomNamespaceSyncRuleArgs
                {
                    DefaultAction = "Exclude",
                    FilterAction = "Include",
                    FilterSource = "filter('code', '200')",
                    Namespace = "my-custom-namespace",
                },
            },
            NamespaceSyncRules = new[]
            {
                new SignalFx.Aws.Inputs.IntegrationNamespaceSyncRuleArgs
                {
                    DefaultAction = "Exclude",
                    FilterAction = "Include",
                    FilterSource = "filter('code', '200')",
                    Namespace = "AWS/EC2",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.signalfx.aws.TokenIntegration;
    import com.pulumi.signalfx.aws.TokenIntegrationArgs;
    import com.pulumi.aws.iamRole;
    import com.pulumi.signalfx.aws.Integration;
    import com.pulumi.signalfx.aws.IntegrationArgs;
    import com.pulumi.signalfx.aws.inputs.IntegrationCustomNamespaceSyncRuleArgs;
    import com.pulumi.signalfx.aws.inputs.IntegrationNamespaceSyncRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var awsMyteamToken = new TokenIntegration("awsMyteamToken", TokenIntegrationArgs.builder()
                .name("My AWS integration")
                .build());
    
            // Make yourself an AWS IAM role here
            var awsSfxRole = new IamRole("awsSfxRole");
    
            var awsMyteam = new Integration("awsMyteam", IntegrationArgs.builder()
                .enabled(true)
                .integrationId(awsMyteamToken.id())
                .token("put_your_token_here")
                .key("put_your_key_here")
                .regions("us-east-1")
                .pollRate(300)
                .importCloudWatch(true)
                .enableAwsUsage(true)
                .customNamespaceSyncRules(IntegrationCustomNamespaceSyncRuleArgs.builder()
                    .defaultAction("Exclude")
                    .filterAction("Include")
                    .filterSource("filter('code', '200')")
                    .namespace("my-custom-namespace")
                    .build())
                .namespaceSyncRules(IntegrationNamespaceSyncRuleArgs.builder()
                    .defaultAction("Exclude")
                    .filterAction("Include")
                    .filterSource("filter('code', '200')")
                    .namespace("AWS/EC2")
                    .build())
                .build());
    
        }
    }
    
    resources:
      awsMyteamToken:
        type: signalfx:aws:TokenIntegration
        name: aws_myteam_token
        properties:
          name: My AWS integration
      # Make yourself an AWS IAM role here
      awsSfxRole:
        type: aws:iamRole
        name: aws_sfx_role
      awsMyteam:
        type: signalfx:aws:Integration
        name: aws_myteam
        properties:
          enabled: true
          integrationId: ${awsMyteamToken.id}
          token: put_your_token_here
          key: put_your_key_here
          regions:
            - us-east-1
          pollRate: 300
          importCloudWatch: true
          enableAwsUsage: true
          customNamespaceSyncRules:
            - defaultAction: Exclude
              filterAction: Include
              filterSource: filter('code', '200')
              namespace: my-custom-namespace
          namespaceSyncRules:
            - defaultAction: Exclude
              filterAction: Include
              filterSource: filter('code', '200')
              namespace: AWS/EC2
    

    Create TokenIntegration Resource

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

    Constructor syntax

    new TokenIntegration(name: string, args?: TokenIntegrationArgs, opts?: CustomResourceOptions);
    @overload
    def TokenIntegration(resource_name: str,
                         args: Optional[TokenIntegrationArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def TokenIntegration(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         name: Optional[str] = None)
    func NewTokenIntegration(ctx *Context, name string, args *TokenIntegrationArgs, opts ...ResourceOption) (*TokenIntegration, error)
    public TokenIntegration(string name, TokenIntegrationArgs? args = null, CustomResourceOptions? opts = null)
    public TokenIntegration(String name, TokenIntegrationArgs args)
    public TokenIntegration(String name, TokenIntegrationArgs args, CustomResourceOptions options)
    
    type: signalfx:aws:TokenIntegration
    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 TokenIntegrationArgs
    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 TokenIntegrationArgs
    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 TokenIntegrationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TokenIntegrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TokenIntegrationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var tokenIntegrationResource = new SignalFx.Aws.TokenIntegration("tokenIntegrationResource", new()
    {
        Name = "string",
    });
    
    example, err := aws.NewTokenIntegration(ctx, "tokenIntegrationResource", &aws.TokenIntegrationArgs{
    	Name: pulumi.String("string"),
    })
    
    var tokenIntegrationResource = new TokenIntegration("tokenIntegrationResource", TokenIntegrationArgs.builder()
        .name("string")
        .build());
    
    token_integration_resource = signalfx.aws.TokenIntegration("tokenIntegrationResource", name="string")
    
    const tokenIntegrationResource = new signalfx.aws.TokenIntegration("tokenIntegrationResource", {name: "string"});
    
    type: signalfx:aws:TokenIntegration
    properties:
        name: string
    

    TokenIntegration 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 TokenIntegration resource accepts the following input properties:

    Name string
    The name of this integration
    Name string
    The name of this integration
    name String
    The name of this integration
    name string
    The name of this integration
    name str
    The name of this integration
    name String
    The name of this integration

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    SignalfxAwsAccount string
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    TokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    Id string
    The provider-assigned unique ID for this managed resource.
    SignalfxAwsAccount string
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    TokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    id String
    The provider-assigned unique ID for this managed resource.
    signalfxAwsAccount String
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    tokenId String
    The SignalFx-generated AWS token to use with an AWS integration.
    id string
    The provider-assigned unique ID for this managed resource.
    signalfxAwsAccount string
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    tokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    id str
    The provider-assigned unique ID for this managed resource.
    signalfx_aws_account str
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    token_id str
    The SignalFx-generated AWS token to use with an AWS integration.
    id String
    The provider-assigned unique ID for this managed resource.
    signalfxAwsAccount String
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    tokenId String
    The SignalFx-generated AWS token to use with an AWS integration.

    Look up Existing TokenIntegration Resource

    Get an existing TokenIntegration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TokenIntegrationState, opts?: CustomResourceOptions): TokenIntegration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            signalfx_aws_account: Optional[str] = None,
            token_id: Optional[str] = None) -> TokenIntegration
    func GetTokenIntegration(ctx *Context, name string, id IDInput, state *TokenIntegrationState, opts ...ResourceOption) (*TokenIntegration, error)
    public static TokenIntegration Get(string name, Input<string> id, TokenIntegrationState? state, CustomResourceOptions? opts = null)
    public static TokenIntegration get(String name, Output<String> id, TokenIntegrationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Name string
    The name of this integration
    SignalfxAwsAccount string
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    TokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    Name string
    The name of this integration
    SignalfxAwsAccount string
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    TokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    name String
    The name of this integration
    signalfxAwsAccount String
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    tokenId String
    The SignalFx-generated AWS token to use with an AWS integration.
    name string
    The name of this integration
    signalfxAwsAccount string
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    tokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    name str
    The name of this integration
    signalfx_aws_account str
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    token_id str
    The SignalFx-generated AWS token to use with an AWS integration.
    name String
    The name of this integration
    signalfxAwsAccount String
    The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.
    tokenId String
    The SignalFx-generated AWS token to use with an AWS integration.

    Package Details

    Repository
    SignalFx pulumi/pulumi-signalfx
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the signalfx Terraform Provider.
    signalfx logo
    SignalFx v7.2.1 published on Tuesday, Sep 17, 2024 by Pulumi