github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53/getQueryLogConfig.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 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // `route53.ResolverQueryLogConfig` provides details about a specific Route53 Resolver Query Logging Configuration. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := route53.GetQueryLogConfig(ctx, &route53.GetQueryLogConfigArgs{ 32 // ResolverQueryLogConfigId: pulumi.StringRef("rqlc-1abc2345ef678g91h"), 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 // 44 // <!--Start PulumiCodeChooser --> 45 // ```go 46 // package main 47 // 48 // import ( 49 // 50 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 51 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 52 // 53 // ) 54 // 55 // func main() { 56 // pulumi.Run(func(ctx *pulumi.Context) error { 57 // _, err := route53.GetQueryLogConfig(ctx, &route53.GetQueryLogConfigArgs{ 58 // Filters: []route53.GetQueryLogConfigFilter{ 59 // { 60 // Name: "Name", 61 // Values: []string{ 62 // "shared-query-log-config", 63 // }, 64 // }, 65 // { 66 // Name: "ShareStatus", 67 // Values: []string{ 68 // "SHARED_WITH_ME", 69 // }, 70 // }, 71 // }, 72 // }, nil) 73 // if err != nil { 74 // return err 75 // } 76 // return nil 77 // }) 78 // } 79 // 80 // ``` 81 // <!--End PulumiCodeChooser --> 82 func GetQueryLogConfig(ctx *pulumi.Context, args *GetQueryLogConfigArgs, opts ...pulumi.InvokeOption) (*GetQueryLogConfigResult, error) { 83 opts = internal.PkgInvokeDefaultOpts(opts) 84 var rv GetQueryLogConfigResult 85 err := ctx.Invoke("aws:route53/getQueryLogConfig:getQueryLogConfig", args, &rv, opts...) 86 if err != nil { 87 return nil, err 88 } 89 return &rv, nil 90 } 91 92 // A collection of arguments for invoking getQueryLogConfig. 93 type GetQueryLogConfigArgs struct { 94 // One or more name/value pairs to use as filters. There are 95 // several valid keys, for a full reference, check out 96 // [Route53resolver Filter value in the AWS API reference][1]. 97 // 98 // In addition to all arguments above, the following attributes are exported: 99 Filters []GetQueryLogConfigFilter `pulumi:"filters"` 100 // The name of the query logging configuration. 101 Name *string `pulumi:"name"` 102 // ID of the Route53 Resolver Query Logging Configuration. 103 ResolverQueryLogConfigId *string `pulumi:"resolverQueryLogConfigId"` 104 // Map of tags to assign to the service. 105 // 106 // [1]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_Filter.html 107 Tags map[string]string `pulumi:"tags"` 108 } 109 110 // A collection of values returned by getQueryLogConfig. 111 type GetQueryLogConfigResult struct { 112 Arn string `pulumi:"arn"` 113 DestinationArn string `pulumi:"destinationArn"` 114 Filters []GetQueryLogConfigFilter `pulumi:"filters"` 115 // The provider-assigned unique ID for this managed resource. 116 Id string `pulumi:"id"` 117 Name *string `pulumi:"name"` 118 OwnerId string `pulumi:"ownerId"` 119 ResolverQueryLogConfigId *string `pulumi:"resolverQueryLogConfigId"` 120 ShareStatus string `pulumi:"shareStatus"` 121 Tags map[string]string `pulumi:"tags"` 122 } 123 124 func GetQueryLogConfigOutput(ctx *pulumi.Context, args GetQueryLogConfigOutputArgs, opts ...pulumi.InvokeOption) GetQueryLogConfigResultOutput { 125 return pulumi.ToOutputWithContext(context.Background(), args). 126 ApplyT(func(v interface{}) (GetQueryLogConfigResult, error) { 127 args := v.(GetQueryLogConfigArgs) 128 r, err := GetQueryLogConfig(ctx, &args, opts...) 129 var s GetQueryLogConfigResult 130 if r != nil { 131 s = *r 132 } 133 return s, err 134 }).(GetQueryLogConfigResultOutput) 135 } 136 137 // A collection of arguments for invoking getQueryLogConfig. 138 type GetQueryLogConfigOutputArgs struct { 139 // One or more name/value pairs to use as filters. There are 140 // several valid keys, for a full reference, check out 141 // [Route53resolver Filter value in the AWS API reference][1]. 142 // 143 // In addition to all arguments above, the following attributes are exported: 144 Filters GetQueryLogConfigFilterArrayInput `pulumi:"filters"` 145 // The name of the query logging configuration. 146 Name pulumi.StringPtrInput `pulumi:"name"` 147 // ID of the Route53 Resolver Query Logging Configuration. 148 ResolverQueryLogConfigId pulumi.StringPtrInput `pulumi:"resolverQueryLogConfigId"` 149 // Map of tags to assign to the service. 150 // 151 // [1]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_Filter.html 152 Tags pulumi.StringMapInput `pulumi:"tags"` 153 } 154 155 func (GetQueryLogConfigOutputArgs) ElementType() reflect.Type { 156 return reflect.TypeOf((*GetQueryLogConfigArgs)(nil)).Elem() 157 } 158 159 // A collection of values returned by getQueryLogConfig. 160 type GetQueryLogConfigResultOutput struct{ *pulumi.OutputState } 161 162 func (GetQueryLogConfigResultOutput) ElementType() reflect.Type { 163 return reflect.TypeOf((*GetQueryLogConfigResult)(nil)).Elem() 164 } 165 166 func (o GetQueryLogConfigResultOutput) ToGetQueryLogConfigResultOutput() GetQueryLogConfigResultOutput { 167 return o 168 } 169 170 func (o GetQueryLogConfigResultOutput) ToGetQueryLogConfigResultOutputWithContext(ctx context.Context) GetQueryLogConfigResultOutput { 171 return o 172 } 173 174 func (o GetQueryLogConfigResultOutput) Arn() pulumi.StringOutput { 175 return o.ApplyT(func(v GetQueryLogConfigResult) string { return v.Arn }).(pulumi.StringOutput) 176 } 177 178 func (o GetQueryLogConfigResultOutput) DestinationArn() pulumi.StringOutput { 179 return o.ApplyT(func(v GetQueryLogConfigResult) string { return v.DestinationArn }).(pulumi.StringOutput) 180 } 181 182 func (o GetQueryLogConfigResultOutput) Filters() GetQueryLogConfigFilterArrayOutput { 183 return o.ApplyT(func(v GetQueryLogConfigResult) []GetQueryLogConfigFilter { return v.Filters }).(GetQueryLogConfigFilterArrayOutput) 184 } 185 186 // The provider-assigned unique ID for this managed resource. 187 func (o GetQueryLogConfigResultOutput) Id() pulumi.StringOutput { 188 return o.ApplyT(func(v GetQueryLogConfigResult) string { return v.Id }).(pulumi.StringOutput) 189 } 190 191 func (o GetQueryLogConfigResultOutput) Name() pulumi.StringPtrOutput { 192 return o.ApplyT(func(v GetQueryLogConfigResult) *string { return v.Name }).(pulumi.StringPtrOutput) 193 } 194 195 func (o GetQueryLogConfigResultOutput) OwnerId() pulumi.StringOutput { 196 return o.ApplyT(func(v GetQueryLogConfigResult) string { return v.OwnerId }).(pulumi.StringOutput) 197 } 198 199 func (o GetQueryLogConfigResultOutput) ResolverQueryLogConfigId() pulumi.StringPtrOutput { 200 return o.ApplyT(func(v GetQueryLogConfigResult) *string { return v.ResolverQueryLogConfigId }).(pulumi.StringPtrOutput) 201 } 202 203 func (o GetQueryLogConfigResultOutput) ShareStatus() pulumi.StringOutput { 204 return o.ApplyT(func(v GetQueryLogConfigResult) string { return v.ShareStatus }).(pulumi.StringOutput) 205 } 206 207 func (o GetQueryLogConfigResultOutput) Tags() pulumi.StringMapOutput { 208 return o.ApplyT(func(v GetQueryLogConfigResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 209 } 210 211 func init() { 212 pulumi.RegisterOutputType(GetQueryLogConfigResultOutput{}) 213 }