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

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",
    });

});
Copy
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
	})
}
Copy
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());

    }
}
Copy
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",
});
Copy
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")
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. AviatrixCloudwatchAgentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. AviatrixCloudwatchAgentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AviatrixCloudwatchAgentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
var aviatrixCloudwatchAgentResource = new AviatrixCloudwatchAgent("aviatrixCloudwatchAgentResource", AviatrixCloudwatchAgentArgs.builder()
    .cloudwatchRoleArn("string")
    .region("string")
    .excludedGateways("string")
    .logGroupName("string")
    .build());
Copy
aviatrix_cloudwatch_agent_resource = aviatrix.AviatrixCloudwatchAgent("aviatrixCloudwatchAgentResource",
    cloudwatch_role_arn="string",
    region="string",
    excluded_gateways=["string"],
    log_group_name="string")
Copy
const aviatrixCloudwatchAgentResource = new aviatrix.AviatrixCloudwatchAgent("aviatrixCloudwatchAgentResource", {
    cloudwatchRoleArn: "string",
    region: "string",
    excludedGateways: ["string"],
    logGroupName: "string",
});
Copy
type: aviatrix:AviatrixCloudwatchAgent
properties:
    cloudwatchRoleArn: string
    excludedGateways:
        - string
    logGroupName: string
    region: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AviatrixCloudwatchAgent resource accepts the following input properties:

CloudwatchRoleArn
This property is required.
Changes to this property will trigger replacement.
string
CloudWatch role ARN.
Region
This property is required.
Changes to this property will trigger replacement.
string
Name of AWS region.
ExcludedGateways Changes to this property will trigger replacement. List<string>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
LogGroupName Changes to this property will trigger replacement. string
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
CloudwatchRoleArn
This property is required.
Changes to this property will trigger replacement.
string
CloudWatch role ARN.
Region
This property is required.
Changes to this property will trigger replacement.
string
Name of AWS region.
ExcludedGateways Changes to this property will trigger replacement. []string
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
LogGroupName Changes to this property will trigger replacement. string
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
cloudwatchRoleArn
This property is required.
Changes to this property will trigger replacement.
String
CloudWatch role ARN.
region
This property is required.
Changes to this property will trigger replacement.
String
Name of AWS region.
excludedGateways Changes to this property will trigger replacement. List<String>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
logGroupName Changes to this property will trigger replacement. String
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
cloudwatchRoleArn
This property is required.
Changes to this property will trigger replacement.
string
CloudWatch role ARN.
region
This property is required.
Changes to this property will trigger replacement.
string
Name of AWS region.
excludedGateways Changes to this property will trigger replacement. string[]
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
logGroupName Changes to this property will trigger replacement. string
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
cloudwatch_role_arn
This property is required.
Changes to this property will trigger replacement.
str
CloudWatch role ARN.
region
This property is required.
Changes to this property will trigger replacement.
str
Name of AWS region.
excluded_gateways Changes to this property will trigger replacement. Sequence[str]
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
log_group_name Changes to this property will trigger replacement. str
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
cloudwatchRoleArn
This property is required.
Changes to this property will trigger replacement.
String
CloudWatch role ARN.
region
This property is required.
Changes to this property will trigger replacement.
String
Name of AWS region.
excludedGateways Changes to this property will trigger replacement. List<String>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
logGroupName Changes to this property will trigger replacement. 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)
resources:  _:    type: aviatrix:AviatrixCloudwatchAgent    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
CloudWatch role ARN.
ExcludedGateways Changes to this property will trigger replacement. List<string>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
LogGroupName Changes to this property will trigger replacement. string
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
Region Changes to this property will trigger replacement. string
Name of AWS region.
Status string
The status of cloudwatch agent.
CloudwatchRoleArn Changes to this property will trigger replacement. string
CloudWatch role ARN.
ExcludedGateways Changes to this property will trigger replacement. []string
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
LogGroupName Changes to this property will trigger replacement. string
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
Region Changes to this property will trigger replacement. string
Name of AWS region.
Status string
The status of cloudwatch agent.
cloudwatchRoleArn Changes to this property will trigger replacement. String
CloudWatch role ARN.
excludedGateways Changes to this property will trigger replacement. List<String>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
logGroupName Changes to this property will trigger replacement. String
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
region Changes to this property will trigger replacement. String
Name of AWS region.
status String
The status of cloudwatch agent.
cloudwatchRoleArn Changes to this property will trigger replacement. string
CloudWatch role ARN.
excludedGateways Changes to this property will trigger replacement. string[]
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
logGroupName Changes to this property will trigger replacement. string
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
region Changes to this property will trigger replacement. string
Name of AWS region.
status string
The status of cloudwatch agent.
cloudwatch_role_arn Changes to this property will trigger replacement. str
CloudWatch role ARN.
excluded_gateways Changes to this property will trigger replacement. Sequence[str]
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
log_group_name Changes to this property will trigger replacement. str
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
region Changes to this property will trigger replacement. str
Name of AWS region.
status str
The status of cloudwatch agent.
cloudwatchRoleArn Changes to this property will trigger replacement. String
CloudWatch role ARN.
excludedGateways Changes to this property will trigger replacement. List<String>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
logGroupName Changes to this property will trigger replacement. String
Log group name. "AVIATRIX-CLOUDWATCH-LOG" by default.
region Changes to this property will trigger replacement. 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
Copy

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.