1. Packages
  2. SignalFx
  3. API Docs
  4. aws
  5. TokenIntegration
SignalFx v7.1.1 published on Tuesday, Feb 27, 2024 by Pulumi

signalfx.aws.TokenIntegration

Explore with Pulumi AI

signalfx logo
SignalFx v7.1.1 published on Tuesday, Feb 27, 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("awsMyteamToken", {});
    // Make yourself an AWS IAM role here
    const awsSfxRole = new aws.iam.Role("awsSfxRole", {});
    // Stuff here that uses the external and account ID
    const awsMyteam = new signalfx.aws.Integration("awsMyteam", {
        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("awsMyteamToken")
    # Make yourself an AWS IAM role here
    aws_sfx_role = aws.iam.Role("awsSfxRole")
    # Stuff here that uses the external and account ID
    aws_myteam = signalfx.aws.Integration("awsMyteam",
        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=[signalfx.aws.IntegrationCustomNamespaceSyncRuleArgs(
            default_action="Exclude",
            filter_action="Include",
            filter_source="filter('code', '200')",
            namespace="my-custom-namespace",
        )],
        namespace_sync_rules=[signalfx.aws.IntegrationNamespaceSyncRuleArgs(
            default_action="Exclude",
            filter_action="Include",
            filter_source="filter('code', '200')",
            namespace="AWS/EC2",
        )])
    
    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("awsMyteamToken");
    
        // Make yourself an AWS IAM role here
        var awsSfxRole = new Aws.Iam.Role("awsSfxRole");
    
        // Stuff here that uses the external and account ID
        var awsMyteam = new SignalFx.Aws.Integration("awsMyteam", 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 main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/iam"
    	"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, "awsMyteamToken", nil)
    		if err != nil {
    			return err
    		}
    		_, err = iam.NewRole(ctx, "awsSfxRole", nil)
    		if err != nil {
    			return err
    		}
    		_, err = aws.NewIntegration(ctx, "awsMyteam", &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
    	})
    }
    
    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.aws.iam.Role;
    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");
    
            var awsSfxRole = new Role("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
      # Make yourself an AWS IAM role here
      awsSfxRole:
        type: aws:iam:Role
      awsMyteam:
        type: signalfx:aws:Integration
        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
    

    Arguments

    • name - (Required) The name of this integration

    Attributes

    In addition to all arguments above, the following attributes are exported:

    • id - The ID of the integration to use with signalfx.aws.Integration
    • signalfx_aws_account - The AWS Account ARN to use with your policies/roles, provided by Splunk Observability Cloud.

    Create TokenIntegration Resource

    new TokenIntegration(name: string, args?: TokenIntegrationArgs, opts?: CustomResourceOptions);
    @overload
    def TokenIntegration(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         name: Optional[str] = None)
    @overload
    def TokenIntegration(resource_name: str,
                         args: Optional[TokenIntegrationArgs] = None,
                         opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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
    Name of the integration
    Name string
    Name of the integration
    name String
    Name of the integration
    name string
    Name of the integration
    name str
    Name of the integration
    name String
    Name of the 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 Splunk Observability AWS account ID to use with an AWS role.
    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 Splunk Observability AWS account ID to use with an AWS role.
    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 Splunk Observability AWS account ID to use with an AWS role.
    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 Splunk Observability AWS account ID to use with an AWS role.
    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 Splunk Observability AWS account ID to use with an AWS role.
    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 Splunk Observability AWS account ID to use with an AWS role.
    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
    Name of the integration
    SignalfxAwsAccount string
    The Splunk Observability AWS account ID to use with an AWS role.
    TokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    Name string
    Name of the integration
    SignalfxAwsAccount string
    The Splunk Observability AWS account ID to use with an AWS role.
    TokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    name String
    Name of the integration
    signalfxAwsAccount String
    The Splunk Observability AWS account ID to use with an AWS role.
    tokenId String
    The SignalFx-generated AWS token to use with an AWS integration.
    name string
    Name of the integration
    signalfxAwsAccount string
    The Splunk Observability AWS account ID to use with an AWS role.
    tokenId string
    The SignalFx-generated AWS token to use with an AWS integration.
    name str
    Name of the integration
    signalfx_aws_account str
    The Splunk Observability AWS account ID to use with an AWS role.
    token_id str
    The SignalFx-generated AWS token to use with an AWS integration.
    name String
    Name of the integration
    signalfxAwsAccount String
    The Splunk Observability AWS account ID to use with an AWS role.
    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.1.1 published on Tuesday, Feb 27, 2024 by Pulumi