1. Packages
  2. AWS Classic
  3. API Docs
  4. iot
  5. LoggingOptions

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.iot.LoggingOptions

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Provides a resource to manage default logging options.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.iot.LoggingOptions("example", {
        defaultLogLevel: "WARN",
        roleArn: exampleAwsIamRole.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.iot.LoggingOptions("example",
        default_log_level="WARN",
        role_arn=example_aws_iam_role["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iot.NewLoggingOptions(ctx, "example", &iot.LoggingOptionsArgs{
    			DefaultLogLevel: pulumi.String("WARN"),
    			RoleArn:         pulumi.Any(exampleAwsIamRole.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Iot.LoggingOptions("example", new()
        {
            DefaultLogLevel = "WARN",
            RoleArn = exampleAwsIamRole.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iot.LoggingOptions;
    import com.pulumi.aws.iot.LoggingOptionsArgs;
    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 example = new LoggingOptions("example", LoggingOptionsArgs.builder()        
                .defaultLogLevel("WARN")
                .roleArn(exampleAwsIamRole.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:iot:LoggingOptions
        properties:
          defaultLogLevel: WARN
          roleArn: ${exampleAwsIamRole.arn}
    

    Create LoggingOptions Resource

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

    Constructor syntax

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

    var loggingOptionsResource = new Aws.Iot.LoggingOptions("loggingOptionsResource", new()
    {
        DefaultLogLevel = "string",
        RoleArn = "string",
        DisableAllLogs = false,
    });
    
    example, err := iot.NewLoggingOptions(ctx, "loggingOptionsResource", &iot.LoggingOptionsArgs{
    	DefaultLogLevel: pulumi.String("string"),
    	RoleArn:         pulumi.String("string"),
    	DisableAllLogs:  pulumi.Bool(false),
    })
    
    var loggingOptionsResource = new LoggingOptions("loggingOptionsResource", LoggingOptionsArgs.builder()        
        .defaultLogLevel("string")
        .roleArn("string")
        .disableAllLogs(false)
        .build());
    
    logging_options_resource = aws.iot.LoggingOptions("loggingOptionsResource",
        default_log_level="string",
        role_arn="string",
        disable_all_logs=False)
    
    const loggingOptionsResource = new aws.iot.LoggingOptions("loggingOptionsResource", {
        defaultLogLevel: "string",
        roleArn: "string",
        disableAllLogs: false,
    });
    
    type: aws:iot:LoggingOptions
    properties:
        defaultLogLevel: string
        disableAllLogs: false
        roleArn: string
    

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

    DefaultLogLevel string
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    RoleArn string
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    DisableAllLogs bool
    If true all logs are disabled. The default is false.
    DefaultLogLevel string
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    RoleArn string
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    DisableAllLogs bool
    If true all logs are disabled. The default is false.
    defaultLogLevel String
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    roleArn String
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    disableAllLogs Boolean
    If true all logs are disabled. The default is false.
    defaultLogLevel string
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    roleArn string
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    disableAllLogs boolean
    If true all logs are disabled. The default is false.
    default_log_level str
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    role_arn str
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    disable_all_logs bool
    If true all logs are disabled. The default is false.
    defaultLogLevel String
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    roleArn String
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    disableAllLogs Boolean
    If true all logs are disabled. The default is false.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing LoggingOptions Resource

    Get an existing LoggingOptions 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?: LoggingOptionsState, opts?: CustomResourceOptions): LoggingOptions
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            default_log_level: Optional[str] = None,
            disable_all_logs: Optional[bool] = None,
            role_arn: Optional[str] = None) -> LoggingOptions
    func GetLoggingOptions(ctx *Context, name string, id IDInput, state *LoggingOptionsState, opts ...ResourceOption) (*LoggingOptions, error)
    public static LoggingOptions Get(string name, Input<string> id, LoggingOptionsState? state, CustomResourceOptions? opts = null)
    public static LoggingOptions get(String name, Output<String> id, LoggingOptionsState 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:
    DefaultLogLevel string
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    DisableAllLogs bool
    If true all logs are disabled. The default is false.
    RoleArn string
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    DefaultLogLevel string
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    DisableAllLogs bool
    If true all logs are disabled. The default is false.
    RoleArn string
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    defaultLogLevel String
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    disableAllLogs Boolean
    If true all logs are disabled. The default is false.
    roleArn String
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    defaultLogLevel string
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    disableAllLogs boolean
    If true all logs are disabled. The default is false.
    roleArn string
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    default_log_level str
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    disable_all_logs bool
    If true all logs are disabled. The default is false.
    role_arn str
    The ARN of the role that allows IoT to write to Cloudwatch logs.
    defaultLogLevel String
    The default logging level. Valid Values: "DEBUG", "INFO", "ERROR", "WARN", "DISABLED".
    disableAllLogs Boolean
    If true all logs are disabled. The default is false.
    roleArn String
    The ARN of the role that allows IoT to write to Cloudwatch logs.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi