github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53/resolverQueryLogConfig.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package route53
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a Route 53 Resolver query logging configuration resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := route53.NewResolverQueryLogConfig(ctx, "example", &route53.ResolverQueryLogConfigArgs{
    33  //				Name:           pulumi.String("example"),
    34  //				DestinationArn: pulumi.Any(exampleAwsS3Bucket.Arn),
    35  //				Tags: pulumi.StringMap{
    36  //					"Environment": pulumi.String("Prod"),
    37  //				},
    38  //			})
    39  //			if err != nil {
    40  //				return err
    41  //			}
    42  //			return nil
    43  //		})
    44  //	}
    45  //
    46  // ```
    47  // <!--End PulumiCodeChooser -->
    48  //
    49  // ## Import
    50  //
    51  // Using `pulumi import`, import  Route 53 Resolver query logging configurations using the Route 53 Resolver query logging configuration ID. For example:
    52  //
    53  // ```sh
    54  // $ pulumi import aws:route53/resolverQueryLogConfig:ResolverQueryLogConfig example rqlc-92edc3b1838248bf
    55  // ```
    56  type ResolverQueryLogConfig struct {
    57  	pulumi.CustomResourceState
    58  
    59  	// The ARN (Amazon Resource Name) of the Route 53 Resolver query logging configuration.
    60  	Arn pulumi.StringOutput `pulumi:"arn"`
    61  	// The ARN of the resource that you want Route 53 Resolver to send query logs.
    62  	// You can send query logs to an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream.
    63  	DestinationArn pulumi.StringOutput `pulumi:"destinationArn"`
    64  	// The name of the Route 53 Resolver query logging configuration.
    65  	Name pulumi.StringOutput `pulumi:"name"`
    66  	// The AWS account ID of the account that created the query logging configuration.
    67  	OwnerId pulumi.StringOutput `pulumi:"ownerId"`
    68  	// An indication of whether the query logging configuration is shared with other AWS accounts, or was shared with the current account by another AWS account.
    69  	// Sharing is configured through AWS Resource Access Manager (AWS RAM).
    70  	// Values are `NOT_SHARED`, `SHARED_BY_ME` or `SHARED_WITH_ME`
    71  	ShareStatus pulumi.StringOutput `pulumi:"shareStatus"`
    72  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    73  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    74  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    75  	//
    76  	// Deprecated: Please use `tags` instead.
    77  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    78  }
    79  
    80  // NewResolverQueryLogConfig registers a new resource with the given unique name, arguments, and options.
    81  func NewResolverQueryLogConfig(ctx *pulumi.Context,
    82  	name string, args *ResolverQueryLogConfigArgs, opts ...pulumi.ResourceOption) (*ResolverQueryLogConfig, error) {
    83  	if args == nil {
    84  		return nil, errors.New("missing one or more required arguments")
    85  	}
    86  
    87  	if args.DestinationArn == nil {
    88  		return nil, errors.New("invalid value for required argument 'DestinationArn'")
    89  	}
    90  	opts = internal.PkgResourceDefaultOpts(opts)
    91  	var resource ResolverQueryLogConfig
    92  	err := ctx.RegisterResource("aws:route53/resolverQueryLogConfig:ResolverQueryLogConfig", name, args, &resource, opts...)
    93  	if err != nil {
    94  		return nil, err
    95  	}
    96  	return &resource, nil
    97  }
    98  
    99  // GetResolverQueryLogConfig gets an existing ResolverQueryLogConfig resource's state with the given name, ID, and optional
   100  // state properties that are used to uniquely qualify the lookup (nil if not required).
   101  func GetResolverQueryLogConfig(ctx *pulumi.Context,
   102  	name string, id pulumi.IDInput, state *ResolverQueryLogConfigState, opts ...pulumi.ResourceOption) (*ResolverQueryLogConfig, error) {
   103  	var resource ResolverQueryLogConfig
   104  	err := ctx.ReadResource("aws:route53/resolverQueryLogConfig:ResolverQueryLogConfig", name, id, state, &resource, opts...)
   105  	if err != nil {
   106  		return nil, err
   107  	}
   108  	return &resource, nil
   109  }
   110  
   111  // Input properties used for looking up and filtering ResolverQueryLogConfig resources.
   112  type resolverQueryLogConfigState struct {
   113  	// The ARN (Amazon Resource Name) of the Route 53 Resolver query logging configuration.
   114  	Arn *string `pulumi:"arn"`
   115  	// The ARN of the resource that you want Route 53 Resolver to send query logs.
   116  	// You can send query logs to an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream.
   117  	DestinationArn *string `pulumi:"destinationArn"`
   118  	// The name of the Route 53 Resolver query logging configuration.
   119  	Name *string `pulumi:"name"`
   120  	// The AWS account ID of the account that created the query logging configuration.
   121  	OwnerId *string `pulumi:"ownerId"`
   122  	// An indication of whether the query logging configuration is shared with other AWS accounts, or was shared with the current account by another AWS account.
   123  	// Sharing is configured through AWS Resource Access Manager (AWS RAM).
   124  	// Values are `NOT_SHARED`, `SHARED_BY_ME` or `SHARED_WITH_ME`
   125  	ShareStatus *string `pulumi:"shareStatus"`
   126  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   127  	Tags map[string]string `pulumi:"tags"`
   128  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   129  	//
   130  	// Deprecated: Please use `tags` instead.
   131  	TagsAll map[string]string `pulumi:"tagsAll"`
   132  }
   133  
   134  type ResolverQueryLogConfigState struct {
   135  	// The ARN (Amazon Resource Name) of the Route 53 Resolver query logging configuration.
   136  	Arn pulumi.StringPtrInput
   137  	// The ARN of the resource that you want Route 53 Resolver to send query logs.
   138  	// You can send query logs to an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream.
   139  	DestinationArn pulumi.StringPtrInput
   140  	// The name of the Route 53 Resolver query logging configuration.
   141  	Name pulumi.StringPtrInput
   142  	// The AWS account ID of the account that created the query logging configuration.
   143  	OwnerId pulumi.StringPtrInput
   144  	// An indication of whether the query logging configuration is shared with other AWS accounts, or was shared with the current account by another AWS account.
   145  	// Sharing is configured through AWS Resource Access Manager (AWS RAM).
   146  	// Values are `NOT_SHARED`, `SHARED_BY_ME` or `SHARED_WITH_ME`
   147  	ShareStatus pulumi.StringPtrInput
   148  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   149  	Tags pulumi.StringMapInput
   150  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   151  	//
   152  	// Deprecated: Please use `tags` instead.
   153  	TagsAll pulumi.StringMapInput
   154  }
   155  
   156  func (ResolverQueryLogConfigState) ElementType() reflect.Type {
   157  	return reflect.TypeOf((*resolverQueryLogConfigState)(nil)).Elem()
   158  }
   159  
   160  type resolverQueryLogConfigArgs struct {
   161  	// The ARN of the resource that you want Route 53 Resolver to send query logs.
   162  	// You can send query logs to an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream.
   163  	DestinationArn string `pulumi:"destinationArn"`
   164  	// The name of the Route 53 Resolver query logging configuration.
   165  	Name *string `pulumi:"name"`
   166  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   167  	Tags map[string]string `pulumi:"tags"`
   168  }
   169  
   170  // The set of arguments for constructing a ResolverQueryLogConfig resource.
   171  type ResolverQueryLogConfigArgs struct {
   172  	// The ARN of the resource that you want Route 53 Resolver to send query logs.
   173  	// You can send query logs to an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream.
   174  	DestinationArn pulumi.StringInput
   175  	// The name of the Route 53 Resolver query logging configuration.
   176  	Name pulumi.StringPtrInput
   177  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   178  	Tags pulumi.StringMapInput
   179  }
   180  
   181  func (ResolverQueryLogConfigArgs) ElementType() reflect.Type {
   182  	return reflect.TypeOf((*resolverQueryLogConfigArgs)(nil)).Elem()
   183  }
   184  
   185  type ResolverQueryLogConfigInput interface {
   186  	pulumi.Input
   187  
   188  	ToResolverQueryLogConfigOutput() ResolverQueryLogConfigOutput
   189  	ToResolverQueryLogConfigOutputWithContext(ctx context.Context) ResolverQueryLogConfigOutput
   190  }
   191  
   192  func (*ResolverQueryLogConfig) ElementType() reflect.Type {
   193  	return reflect.TypeOf((**ResolverQueryLogConfig)(nil)).Elem()
   194  }
   195  
   196  func (i *ResolverQueryLogConfig) ToResolverQueryLogConfigOutput() ResolverQueryLogConfigOutput {
   197  	return i.ToResolverQueryLogConfigOutputWithContext(context.Background())
   198  }
   199  
   200  func (i *ResolverQueryLogConfig) ToResolverQueryLogConfigOutputWithContext(ctx context.Context) ResolverQueryLogConfigOutput {
   201  	return pulumi.ToOutputWithContext(ctx, i).(ResolverQueryLogConfigOutput)
   202  }
   203  
   204  // ResolverQueryLogConfigArrayInput is an input type that accepts ResolverQueryLogConfigArray and ResolverQueryLogConfigArrayOutput values.
   205  // You can construct a concrete instance of `ResolverQueryLogConfigArrayInput` via:
   206  //
   207  //	ResolverQueryLogConfigArray{ ResolverQueryLogConfigArgs{...} }
   208  type ResolverQueryLogConfigArrayInput interface {
   209  	pulumi.Input
   210  
   211  	ToResolverQueryLogConfigArrayOutput() ResolverQueryLogConfigArrayOutput
   212  	ToResolverQueryLogConfigArrayOutputWithContext(context.Context) ResolverQueryLogConfigArrayOutput
   213  }
   214  
   215  type ResolverQueryLogConfigArray []ResolverQueryLogConfigInput
   216  
   217  func (ResolverQueryLogConfigArray) ElementType() reflect.Type {
   218  	return reflect.TypeOf((*[]*ResolverQueryLogConfig)(nil)).Elem()
   219  }
   220  
   221  func (i ResolverQueryLogConfigArray) ToResolverQueryLogConfigArrayOutput() ResolverQueryLogConfigArrayOutput {
   222  	return i.ToResolverQueryLogConfigArrayOutputWithContext(context.Background())
   223  }
   224  
   225  func (i ResolverQueryLogConfigArray) ToResolverQueryLogConfigArrayOutputWithContext(ctx context.Context) ResolverQueryLogConfigArrayOutput {
   226  	return pulumi.ToOutputWithContext(ctx, i).(ResolverQueryLogConfigArrayOutput)
   227  }
   228  
   229  // ResolverQueryLogConfigMapInput is an input type that accepts ResolverQueryLogConfigMap and ResolverQueryLogConfigMapOutput values.
   230  // You can construct a concrete instance of `ResolverQueryLogConfigMapInput` via:
   231  //
   232  //	ResolverQueryLogConfigMap{ "key": ResolverQueryLogConfigArgs{...} }
   233  type ResolverQueryLogConfigMapInput interface {
   234  	pulumi.Input
   235  
   236  	ToResolverQueryLogConfigMapOutput() ResolverQueryLogConfigMapOutput
   237  	ToResolverQueryLogConfigMapOutputWithContext(context.Context) ResolverQueryLogConfigMapOutput
   238  }
   239  
   240  type ResolverQueryLogConfigMap map[string]ResolverQueryLogConfigInput
   241  
   242  func (ResolverQueryLogConfigMap) ElementType() reflect.Type {
   243  	return reflect.TypeOf((*map[string]*ResolverQueryLogConfig)(nil)).Elem()
   244  }
   245  
   246  func (i ResolverQueryLogConfigMap) ToResolverQueryLogConfigMapOutput() ResolverQueryLogConfigMapOutput {
   247  	return i.ToResolverQueryLogConfigMapOutputWithContext(context.Background())
   248  }
   249  
   250  func (i ResolverQueryLogConfigMap) ToResolverQueryLogConfigMapOutputWithContext(ctx context.Context) ResolverQueryLogConfigMapOutput {
   251  	return pulumi.ToOutputWithContext(ctx, i).(ResolverQueryLogConfigMapOutput)
   252  }
   253  
   254  type ResolverQueryLogConfigOutput struct{ *pulumi.OutputState }
   255  
   256  func (ResolverQueryLogConfigOutput) ElementType() reflect.Type {
   257  	return reflect.TypeOf((**ResolverQueryLogConfig)(nil)).Elem()
   258  }
   259  
   260  func (o ResolverQueryLogConfigOutput) ToResolverQueryLogConfigOutput() ResolverQueryLogConfigOutput {
   261  	return o
   262  }
   263  
   264  func (o ResolverQueryLogConfigOutput) ToResolverQueryLogConfigOutputWithContext(ctx context.Context) ResolverQueryLogConfigOutput {
   265  	return o
   266  }
   267  
   268  // The ARN (Amazon Resource Name) of the Route 53 Resolver query logging configuration.
   269  func (o ResolverQueryLogConfigOutput) Arn() pulumi.StringOutput {
   270  	return o.ApplyT(func(v *ResolverQueryLogConfig) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   271  }
   272  
   273  // The ARN of the resource that you want Route 53 Resolver to send query logs.
   274  // You can send query logs to an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream.
   275  func (o ResolverQueryLogConfigOutput) DestinationArn() pulumi.StringOutput {
   276  	return o.ApplyT(func(v *ResolverQueryLogConfig) pulumi.StringOutput { return v.DestinationArn }).(pulumi.StringOutput)
   277  }
   278  
   279  // The name of the Route 53 Resolver query logging configuration.
   280  func (o ResolverQueryLogConfigOutput) Name() pulumi.StringOutput {
   281  	return o.ApplyT(func(v *ResolverQueryLogConfig) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   282  }
   283  
   284  // The AWS account ID of the account that created the query logging configuration.
   285  func (o ResolverQueryLogConfigOutput) OwnerId() pulumi.StringOutput {
   286  	return o.ApplyT(func(v *ResolverQueryLogConfig) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput)
   287  }
   288  
   289  // An indication of whether the query logging configuration is shared with other AWS accounts, or was shared with the current account by another AWS account.
   290  // Sharing is configured through AWS Resource Access Manager (AWS RAM).
   291  // Values are `NOT_SHARED`, `SHARED_BY_ME` or `SHARED_WITH_ME`
   292  func (o ResolverQueryLogConfigOutput) ShareStatus() pulumi.StringOutput {
   293  	return o.ApplyT(func(v *ResolverQueryLogConfig) pulumi.StringOutput { return v.ShareStatus }).(pulumi.StringOutput)
   294  }
   295  
   296  // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   297  func (o ResolverQueryLogConfigOutput) Tags() pulumi.StringMapOutput {
   298  	return o.ApplyT(func(v *ResolverQueryLogConfig) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   299  }
   300  
   301  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   302  //
   303  // Deprecated: Please use `tags` instead.
   304  func (o ResolverQueryLogConfigOutput) TagsAll() pulumi.StringMapOutput {
   305  	return o.ApplyT(func(v *ResolverQueryLogConfig) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   306  }
   307  
   308  type ResolverQueryLogConfigArrayOutput struct{ *pulumi.OutputState }
   309  
   310  func (ResolverQueryLogConfigArrayOutput) ElementType() reflect.Type {
   311  	return reflect.TypeOf((*[]*ResolverQueryLogConfig)(nil)).Elem()
   312  }
   313  
   314  func (o ResolverQueryLogConfigArrayOutput) ToResolverQueryLogConfigArrayOutput() ResolverQueryLogConfigArrayOutput {
   315  	return o
   316  }
   317  
   318  func (o ResolverQueryLogConfigArrayOutput) ToResolverQueryLogConfigArrayOutputWithContext(ctx context.Context) ResolverQueryLogConfigArrayOutput {
   319  	return o
   320  }
   321  
   322  func (o ResolverQueryLogConfigArrayOutput) Index(i pulumi.IntInput) ResolverQueryLogConfigOutput {
   323  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResolverQueryLogConfig {
   324  		return vs[0].([]*ResolverQueryLogConfig)[vs[1].(int)]
   325  	}).(ResolverQueryLogConfigOutput)
   326  }
   327  
   328  type ResolverQueryLogConfigMapOutput struct{ *pulumi.OutputState }
   329  
   330  func (ResolverQueryLogConfigMapOutput) ElementType() reflect.Type {
   331  	return reflect.TypeOf((*map[string]*ResolverQueryLogConfig)(nil)).Elem()
   332  }
   333  
   334  func (o ResolverQueryLogConfigMapOutput) ToResolverQueryLogConfigMapOutput() ResolverQueryLogConfigMapOutput {
   335  	return o
   336  }
   337  
   338  func (o ResolverQueryLogConfigMapOutput) ToResolverQueryLogConfigMapOutputWithContext(ctx context.Context) ResolverQueryLogConfigMapOutput {
   339  	return o
   340  }
   341  
   342  func (o ResolverQueryLogConfigMapOutput) MapIndex(k pulumi.StringInput) ResolverQueryLogConfigOutput {
   343  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResolverQueryLogConfig {
   344  		return vs[0].(map[string]*ResolverQueryLogConfig)[vs[1].(string)]
   345  	}).(ResolverQueryLogConfigOutput)
   346  }
   347  
   348  func init() {
   349  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverQueryLogConfigInput)(nil)).Elem(), &ResolverQueryLogConfig{})
   350  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverQueryLogConfigArrayInput)(nil)).Elem(), ResolverQueryLogConfigArray{})
   351  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverQueryLogConfigMapInput)(nil)).Elem(), ResolverQueryLogConfigMap{})
   352  	pulumi.RegisterOutputType(ResolverQueryLogConfigOutput{})
   353  	pulumi.RegisterOutputType(ResolverQueryLogConfigArrayOutput{})
   354  	pulumi.RegisterOutputType(ResolverQueryLogConfigMapOutput{})
   355  }