1. Packages
  2. Aviatrix
  3. API Docs
  4. AviatrixCloudwatchAgent
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

aviatrix.AviatrixCloudwatchAgent

Explore with Pulumi AI

aviatrix logo
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

    The aviatrix_cloudwatch_agent resource allows the enabling and disabling of cloudwatch agent.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Aviatrix = Pulumi.Aviatrix;
    
    return await Deployment.RunAsync(() => 
    {
        // Enable cloudwatch agent
        var testCloudwatchAgent = new Aviatrix.AviatrixCloudwatchAgent("testCloudwatchAgent", new()
        {
            CloudwatchRoleArn = "arn:aws:iam::469550033836:role/aviatrix-role-cloudwatch",
            ExcludedGateways = new[]
            {
                "a",
                "b",
            },
            Region = "us-east-1",
        });
    
    });
    
    package main
    
    import (
    	"github.com/astipkovits/pulumi-aviatrix/sdk/go/aviatrix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aviatrix.NewAviatrixCloudwatchAgent(ctx, "testCloudwatchAgent", &aviatrix.AviatrixCloudwatchAgentArgs{
    			CloudwatchRoleArn: pulumi.String("arn:aws:iam::469550033836:role/aviatrix-role-cloudwatch"),
    			ExcludedGateways: pulumi.StringArray{
    				pulumi.String("a"),
    				pulumi.String("b"),
    			},
    			Region: pulumi.String("us-east-1"),
    		})
    		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.aviatrix.AviatrixCloudwatchAgent;
    import com.pulumi.aviatrix.AviatrixCloudwatchAgentArgs;
    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 testCloudwatchAgent = new AviatrixCloudwatchAgent("testCloudwatchAgent", AviatrixCloudwatchAgentArgs.builder()        
                .cloudwatchRoleArn("arn:aws:iam::469550033836:role/aviatrix-role-cloudwatch")
                .excludedGateways(            
                    "a",
                    "b")
                .region("us-east-1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aviatrix as aviatrix
    
    # Enable cloudwatch agent
    test_cloudwatch_agent = aviatrix.AviatrixCloudwatchAgent("testCloudwatchAgent",
        cloudwatch_role_arn="arn:aws:iam::469550033836:role/aviatrix-role-cloudwatch",
        excluded_gateways=[
            "a",
            "b",
        ],
        region="us-east-1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aviatrix from "@pulumi/aviatrix";
    
    // Enable cloudwatch agent
    const testCloudwatchAgent = new aviatrix.AviatrixCloudwatchAgent("test_cloudwatch_agent", {
        cloudwatchRoleArn: "arn:aws:iam::469550033836:role/aviatrix-role-cloudwatch",
        excludedGateways: [
            "a",
            "b",
        ],
        region: "us-east-1",
    });
    
    resources:
      # Enable cloudwatch agent
      testCloudwatchAgent:
        type: aviatrix:AviatrixCloudwatchAgent
        properties:
          cloudwatchRoleArn: arn:aws:iam::469550033836:role/aviatrix-role-cloudwatch
          excludedGateways:
            - a
            - b
          region: us-east-1
    

    Create AviatrixCloudwatchAgent Resource

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

    Constructor syntax

    new AviatrixCloudwatchAgent(name: string, args: AviatrixCloudwatchAgentArgs, opts?: CustomResourceOptions);
    @overload
    def AviatrixCloudwatchAgent(resource_name: str,
                                args: AviatrixCloudwatchAgentArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def AviatrixCloudwatchAgent(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                cloudwatch_role_arn: Optional[str] = None,
                                region: Optional[str] = None,
                                excluded_gateways: Optional[Sequence[str]] = None,
                                log_group_name: Optional[str] = None)
    func NewAviatrixCloudwatchAgent(ctx *Context, name string, args AviatrixCloudwatchAgentArgs, opts ...ResourceOption) (*AviatrixCloudwatchAgent, error)
    public AviatrixCloudwatchAgent(string name, AviatrixCloudwatchAgentArgs args, CustomResourceOptions? opts = null)
    public AviatrixCloudwatchAgent(String name, AviatrixCloudwatchAgentArgs args)
    public AviatrixCloudwatchAgent(String name, AviatrixCloudwatchAgentArgs args, CustomResourceOptions options)
    
    type: aviatrix:AviatrixCloudwatchAgent
    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 AviatrixCloudwatchAgentArgs
    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 AviatrixCloudwatchAgentArgs
    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 AviatrixCloudwatchAgentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AviatrixCloudwatchAgentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AviatrixCloudwatchAgentArgs
    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 aviatrixCloudwatchAgentResource = new Aviatrix.AviatrixCloudwatchAgent("aviatrixCloudwatchAgentResource", new()
    {
        CloudwatchRoleArn = "string",
        Region = "string",
        ExcludedGateways = new[]
        {
            "string",
        },
        LogGroupName = "string",
    });
    
    example, err := aviatrix.NewAviatrixCloudwatchAgent(ctx, "aviatrixCloudwatchAgentResource", &aviatrix.AviatrixCloudwatchAgentArgs{
    	CloudwatchRoleArn: pulumi.String("string"),
    	Region:            pulumi.String("string"),
    	ExcludedGateways: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LogGroupName: pulumi.String("string"),
    })
    
    var aviatrixCloudwatchAgentResource = new AviatrixCloudwatchAgent("aviatrixCloudwatchAgentResource", AviatrixCloudwatchAgentArgs.builder()
        .cloudwatchRoleArn("string")
        .region("string")
        .excludedGateways("string")
        .logGroupName("string")
        .build());
    
    aviatrix_cloudwatch_agent_resource = aviatrix.AviatrixCloudwatchAgent("aviatrixCloudwatchAgentResource",
        cloudwatch_role_arn="string",
        region="string",
        excluded_gateways=["string"],
        log_group_name="string")
    
    const aviatrixCloudwatchAgentResource = new aviatrix.AviatrixCloudwatchAgent("aviatrixCloudwatchAgentResource", {
        cloudwatchRoleArn: "string",
        region: "string",
        excludedGateways: ["string"],
        logGroupName: "string",
    });
    
    type: aviatrix:AviatrixCloudwatchAgent
    properties:
        cloudwatchRoleArn: string
        excludedGateways:
            - string
        logGroupName: string
        region: string
    

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

    CloudwatchRoleArn string
    CloudWatch role ARN.
    Region string
    Name of AWS region.
    ExcludedGateways List<string>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    LogGroupName string
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    CloudwatchRoleArn string
    CloudWatch role ARN.
    Region string
    Name of AWS region.
    ExcludedGateways []string
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    LogGroupName string
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    cloudwatchRoleArn String
    CloudWatch role ARN.
    region String
    Name of AWS region.
    excludedGateways List<String>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    logGroupName String
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    cloudwatchRoleArn string
    CloudWatch role ARN.
    region string
    Name of AWS region.
    excludedGateways string[]
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    logGroupName string
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    cloudwatch_role_arn str
    CloudWatch role ARN.
    region str
    Name of AWS region.
    excluded_gateways Sequence[str]
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    log_group_name str
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    cloudwatchRoleArn String
    CloudWatch role ARN.
    region String
    Name of AWS region.
    excludedGateways List<String>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    logGroupName String
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of cloudwatch agent.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of cloudwatch agent.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of cloudwatch agent.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of cloudwatch agent.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of cloudwatch agent.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of cloudwatch agent.

    Look up Existing AviatrixCloudwatchAgent Resource

    Get an existing AviatrixCloudwatchAgent 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?: AviatrixCloudwatchAgentState, opts?: CustomResourceOptions): AviatrixCloudwatchAgent
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cloudwatch_role_arn: Optional[str] = None,
            excluded_gateways: Optional[Sequence[str]] = None,
            log_group_name: Optional[str] = None,
            region: Optional[str] = None,
            status: Optional[str] = None) -> AviatrixCloudwatchAgent
    func GetAviatrixCloudwatchAgent(ctx *Context, name string, id IDInput, state *AviatrixCloudwatchAgentState, opts ...ResourceOption) (*AviatrixCloudwatchAgent, error)
    public static AviatrixCloudwatchAgent Get(string name, Input<string> id, AviatrixCloudwatchAgentState? state, CustomResourceOptions? opts = null)
    public static AviatrixCloudwatchAgent get(String name, Output<String> id, AviatrixCloudwatchAgentState 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:
    CloudwatchRoleArn string
    CloudWatch role ARN.
    ExcludedGateways List<string>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    LogGroupName string
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    Region string
    Name of AWS region.
    Status string
    The status of cloudwatch agent.
    CloudwatchRoleArn string
    CloudWatch role ARN.
    ExcludedGateways []string
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    LogGroupName string
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    Region string
    Name of AWS region.
    Status string
    The status of cloudwatch agent.
    cloudwatchRoleArn String
    CloudWatch role ARN.
    excludedGateways List<String>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    logGroupName String
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    region String
    Name of AWS region.
    status String
    The status of cloudwatch agent.
    cloudwatchRoleArn string
    CloudWatch role ARN.
    excludedGateways string[]
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    logGroupName string
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    region string
    Name of AWS region.
    status string
    The status of cloudwatch agent.
    cloudwatch_role_arn str
    CloudWatch role ARN.
    excluded_gateways Sequence[str]
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    log_group_name str
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    region str
    Name of AWS region.
    status str
    The status of cloudwatch agent.
    cloudwatchRoleArn String
    CloudWatch role ARN.
    excludedGateways List<String>
    List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
    logGroupName String
    Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
    region String
    Name of AWS region.
    status String
    The status of cloudwatch agent.

    Import

    cloudwatch_agent can be imported using “cloudwatch_agent”, e.g.

     $ pulumi import aviatrix:index/aviatrixCloudwatchAgent:AviatrixCloudwatchAgent test cloudwatch_agent
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    aviatrix astipkovits/pulumi-aviatrix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aviatrix Terraform Provider.
    aviatrix logo
    Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix