github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53/resolverFirewallRuleGroup.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  // Provides a Route 53 Resolver DNS Firewall rule group resource.
    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.NewResolverFirewallRuleGroup(ctx, "example", &route53.ResolverFirewallRuleGroupArgs{
    32  //				Name: pulumi.String("example"),
    33  //			})
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  //
    44  // ## Import
    45  //
    46  // Using `pulumi import`, import  Route 53 Resolver DNS Firewall rule groups using the Route 53 Resolver DNS Firewall rule group ID. For example:
    47  //
    48  // ```sh
    49  // $ pulumi import aws:route53/resolverFirewallRuleGroup:ResolverFirewallRuleGroup example rslvr-frg-0123456789abcdef
    50  // ```
    51  type ResolverFirewallRuleGroup struct {
    52  	pulumi.CustomResourceState
    53  
    54  	// The ARN (Amazon Resource Name) of the rule group.
    55  	Arn pulumi.StringOutput `pulumi:"arn"`
    56  	// A name that lets you identify the rule group, to manage and use it.
    57  	Name pulumi.StringOutput `pulumi:"name"`
    58  	// The AWS account ID for the account that created the rule group. When a rule group is shared with your account, this is the account that has shared the rule group with you.
    59  	OwnerId pulumi.StringOutput `pulumi:"ownerId"`
    60  	// Whether the rule group is shared with other AWS accounts, or was shared with the current account by another AWS account. Sharing is configured through AWS Resource Access Manager (AWS RAM). Valid values: `NOT_SHARED`, `SHARED_BY_ME`, `SHARED_WITH_ME`
    61  	ShareStatus pulumi.StringOutput `pulumi:"shareStatus"`
    62  	// 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.
    63  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    64  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    65  	//
    66  	// Deprecated: Please use `tags` instead.
    67  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    68  }
    69  
    70  // NewResolverFirewallRuleGroup registers a new resource with the given unique name, arguments, and options.
    71  func NewResolverFirewallRuleGroup(ctx *pulumi.Context,
    72  	name string, args *ResolverFirewallRuleGroupArgs, opts ...pulumi.ResourceOption) (*ResolverFirewallRuleGroup, error) {
    73  	if args == nil {
    74  		args = &ResolverFirewallRuleGroupArgs{}
    75  	}
    76  
    77  	opts = internal.PkgResourceDefaultOpts(opts)
    78  	var resource ResolverFirewallRuleGroup
    79  	err := ctx.RegisterResource("aws:route53/resolverFirewallRuleGroup:ResolverFirewallRuleGroup", name, args, &resource, opts...)
    80  	if err != nil {
    81  		return nil, err
    82  	}
    83  	return &resource, nil
    84  }
    85  
    86  // GetResolverFirewallRuleGroup gets an existing ResolverFirewallRuleGroup resource's state with the given name, ID, and optional
    87  // state properties that are used to uniquely qualify the lookup (nil if not required).
    88  func GetResolverFirewallRuleGroup(ctx *pulumi.Context,
    89  	name string, id pulumi.IDInput, state *ResolverFirewallRuleGroupState, opts ...pulumi.ResourceOption) (*ResolverFirewallRuleGroup, error) {
    90  	var resource ResolverFirewallRuleGroup
    91  	err := ctx.ReadResource("aws:route53/resolverFirewallRuleGroup:ResolverFirewallRuleGroup", name, id, state, &resource, opts...)
    92  	if err != nil {
    93  		return nil, err
    94  	}
    95  	return &resource, nil
    96  }
    97  
    98  // Input properties used for looking up and filtering ResolverFirewallRuleGroup resources.
    99  type resolverFirewallRuleGroupState struct {
   100  	// The ARN (Amazon Resource Name) of the rule group.
   101  	Arn *string `pulumi:"arn"`
   102  	// A name that lets you identify the rule group, to manage and use it.
   103  	Name *string `pulumi:"name"`
   104  	// The AWS account ID for the account that created the rule group. When a rule group is shared with your account, this is the account that has shared the rule group with you.
   105  	OwnerId *string `pulumi:"ownerId"`
   106  	// Whether the rule group is shared with other AWS accounts, or was shared with the current account by another AWS account. Sharing is configured through AWS Resource Access Manager (AWS RAM). Valid values: `NOT_SHARED`, `SHARED_BY_ME`, `SHARED_WITH_ME`
   107  	ShareStatus *string `pulumi:"shareStatus"`
   108  	// 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.
   109  	Tags map[string]string `pulumi:"tags"`
   110  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   111  	//
   112  	// Deprecated: Please use `tags` instead.
   113  	TagsAll map[string]string `pulumi:"tagsAll"`
   114  }
   115  
   116  type ResolverFirewallRuleGroupState struct {
   117  	// The ARN (Amazon Resource Name) of the rule group.
   118  	Arn pulumi.StringPtrInput
   119  	// A name that lets you identify the rule group, to manage and use it.
   120  	Name pulumi.StringPtrInput
   121  	// The AWS account ID for the account that created the rule group. When a rule group is shared with your account, this is the account that has shared the rule group with you.
   122  	OwnerId pulumi.StringPtrInput
   123  	// Whether the rule group is shared with other AWS accounts, or was shared with the current account by another AWS account. Sharing is configured through AWS Resource Access Manager (AWS RAM). Valid values: `NOT_SHARED`, `SHARED_BY_ME`, `SHARED_WITH_ME`
   124  	ShareStatus pulumi.StringPtrInput
   125  	// 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.
   126  	Tags pulumi.StringMapInput
   127  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   128  	//
   129  	// Deprecated: Please use `tags` instead.
   130  	TagsAll pulumi.StringMapInput
   131  }
   132  
   133  func (ResolverFirewallRuleGroupState) ElementType() reflect.Type {
   134  	return reflect.TypeOf((*resolverFirewallRuleGroupState)(nil)).Elem()
   135  }
   136  
   137  type resolverFirewallRuleGroupArgs struct {
   138  	// A name that lets you identify the rule group, to manage and use it.
   139  	Name *string `pulumi:"name"`
   140  	// 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.
   141  	Tags map[string]string `pulumi:"tags"`
   142  }
   143  
   144  // The set of arguments for constructing a ResolverFirewallRuleGroup resource.
   145  type ResolverFirewallRuleGroupArgs struct {
   146  	// A name that lets you identify the rule group, to manage and use it.
   147  	Name 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  }
   151  
   152  func (ResolverFirewallRuleGroupArgs) ElementType() reflect.Type {
   153  	return reflect.TypeOf((*resolverFirewallRuleGroupArgs)(nil)).Elem()
   154  }
   155  
   156  type ResolverFirewallRuleGroupInput interface {
   157  	pulumi.Input
   158  
   159  	ToResolverFirewallRuleGroupOutput() ResolverFirewallRuleGroupOutput
   160  	ToResolverFirewallRuleGroupOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupOutput
   161  }
   162  
   163  func (*ResolverFirewallRuleGroup) ElementType() reflect.Type {
   164  	return reflect.TypeOf((**ResolverFirewallRuleGroup)(nil)).Elem()
   165  }
   166  
   167  func (i *ResolverFirewallRuleGroup) ToResolverFirewallRuleGroupOutput() ResolverFirewallRuleGroupOutput {
   168  	return i.ToResolverFirewallRuleGroupOutputWithContext(context.Background())
   169  }
   170  
   171  func (i *ResolverFirewallRuleGroup) ToResolverFirewallRuleGroupOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupOutput {
   172  	return pulumi.ToOutputWithContext(ctx, i).(ResolverFirewallRuleGroupOutput)
   173  }
   174  
   175  // ResolverFirewallRuleGroupArrayInput is an input type that accepts ResolverFirewallRuleGroupArray and ResolverFirewallRuleGroupArrayOutput values.
   176  // You can construct a concrete instance of `ResolverFirewallRuleGroupArrayInput` via:
   177  //
   178  //	ResolverFirewallRuleGroupArray{ ResolverFirewallRuleGroupArgs{...} }
   179  type ResolverFirewallRuleGroupArrayInput interface {
   180  	pulumi.Input
   181  
   182  	ToResolverFirewallRuleGroupArrayOutput() ResolverFirewallRuleGroupArrayOutput
   183  	ToResolverFirewallRuleGroupArrayOutputWithContext(context.Context) ResolverFirewallRuleGroupArrayOutput
   184  }
   185  
   186  type ResolverFirewallRuleGroupArray []ResolverFirewallRuleGroupInput
   187  
   188  func (ResolverFirewallRuleGroupArray) ElementType() reflect.Type {
   189  	return reflect.TypeOf((*[]*ResolverFirewallRuleGroup)(nil)).Elem()
   190  }
   191  
   192  func (i ResolverFirewallRuleGroupArray) ToResolverFirewallRuleGroupArrayOutput() ResolverFirewallRuleGroupArrayOutput {
   193  	return i.ToResolverFirewallRuleGroupArrayOutputWithContext(context.Background())
   194  }
   195  
   196  func (i ResolverFirewallRuleGroupArray) ToResolverFirewallRuleGroupArrayOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupArrayOutput {
   197  	return pulumi.ToOutputWithContext(ctx, i).(ResolverFirewallRuleGroupArrayOutput)
   198  }
   199  
   200  // ResolverFirewallRuleGroupMapInput is an input type that accepts ResolverFirewallRuleGroupMap and ResolverFirewallRuleGroupMapOutput values.
   201  // You can construct a concrete instance of `ResolverFirewallRuleGroupMapInput` via:
   202  //
   203  //	ResolverFirewallRuleGroupMap{ "key": ResolverFirewallRuleGroupArgs{...} }
   204  type ResolverFirewallRuleGroupMapInput interface {
   205  	pulumi.Input
   206  
   207  	ToResolverFirewallRuleGroupMapOutput() ResolverFirewallRuleGroupMapOutput
   208  	ToResolverFirewallRuleGroupMapOutputWithContext(context.Context) ResolverFirewallRuleGroupMapOutput
   209  }
   210  
   211  type ResolverFirewallRuleGroupMap map[string]ResolverFirewallRuleGroupInput
   212  
   213  func (ResolverFirewallRuleGroupMap) ElementType() reflect.Type {
   214  	return reflect.TypeOf((*map[string]*ResolverFirewallRuleGroup)(nil)).Elem()
   215  }
   216  
   217  func (i ResolverFirewallRuleGroupMap) ToResolverFirewallRuleGroupMapOutput() ResolverFirewallRuleGroupMapOutput {
   218  	return i.ToResolverFirewallRuleGroupMapOutputWithContext(context.Background())
   219  }
   220  
   221  func (i ResolverFirewallRuleGroupMap) ToResolverFirewallRuleGroupMapOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupMapOutput {
   222  	return pulumi.ToOutputWithContext(ctx, i).(ResolverFirewallRuleGroupMapOutput)
   223  }
   224  
   225  type ResolverFirewallRuleGroupOutput struct{ *pulumi.OutputState }
   226  
   227  func (ResolverFirewallRuleGroupOutput) ElementType() reflect.Type {
   228  	return reflect.TypeOf((**ResolverFirewallRuleGroup)(nil)).Elem()
   229  }
   230  
   231  func (o ResolverFirewallRuleGroupOutput) ToResolverFirewallRuleGroupOutput() ResolverFirewallRuleGroupOutput {
   232  	return o
   233  }
   234  
   235  func (o ResolverFirewallRuleGroupOutput) ToResolverFirewallRuleGroupOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupOutput {
   236  	return o
   237  }
   238  
   239  // The ARN (Amazon Resource Name) of the rule group.
   240  func (o ResolverFirewallRuleGroupOutput) Arn() pulumi.StringOutput {
   241  	return o.ApplyT(func(v *ResolverFirewallRuleGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   242  }
   243  
   244  // A name that lets you identify the rule group, to manage and use it.
   245  func (o ResolverFirewallRuleGroupOutput) Name() pulumi.StringOutput {
   246  	return o.ApplyT(func(v *ResolverFirewallRuleGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   247  }
   248  
   249  // The AWS account ID for the account that created the rule group. When a rule group is shared with your account, this is the account that has shared the rule group with you.
   250  func (o ResolverFirewallRuleGroupOutput) OwnerId() pulumi.StringOutput {
   251  	return o.ApplyT(func(v *ResolverFirewallRuleGroup) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput)
   252  }
   253  
   254  // Whether the rule group is shared with other AWS accounts, or was shared with the current account by another AWS account. Sharing is configured through AWS Resource Access Manager (AWS RAM). Valid values: `NOT_SHARED`, `SHARED_BY_ME`, `SHARED_WITH_ME`
   255  func (o ResolverFirewallRuleGroupOutput) ShareStatus() pulumi.StringOutput {
   256  	return o.ApplyT(func(v *ResolverFirewallRuleGroup) pulumi.StringOutput { return v.ShareStatus }).(pulumi.StringOutput)
   257  }
   258  
   259  // 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.
   260  func (o ResolverFirewallRuleGroupOutput) Tags() pulumi.StringMapOutput {
   261  	return o.ApplyT(func(v *ResolverFirewallRuleGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   262  }
   263  
   264  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   265  //
   266  // Deprecated: Please use `tags` instead.
   267  func (o ResolverFirewallRuleGroupOutput) TagsAll() pulumi.StringMapOutput {
   268  	return o.ApplyT(func(v *ResolverFirewallRuleGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   269  }
   270  
   271  type ResolverFirewallRuleGroupArrayOutput struct{ *pulumi.OutputState }
   272  
   273  func (ResolverFirewallRuleGroupArrayOutput) ElementType() reflect.Type {
   274  	return reflect.TypeOf((*[]*ResolverFirewallRuleGroup)(nil)).Elem()
   275  }
   276  
   277  func (o ResolverFirewallRuleGroupArrayOutput) ToResolverFirewallRuleGroupArrayOutput() ResolverFirewallRuleGroupArrayOutput {
   278  	return o
   279  }
   280  
   281  func (o ResolverFirewallRuleGroupArrayOutput) ToResolverFirewallRuleGroupArrayOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupArrayOutput {
   282  	return o
   283  }
   284  
   285  func (o ResolverFirewallRuleGroupArrayOutput) Index(i pulumi.IntInput) ResolverFirewallRuleGroupOutput {
   286  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResolverFirewallRuleGroup {
   287  		return vs[0].([]*ResolverFirewallRuleGroup)[vs[1].(int)]
   288  	}).(ResolverFirewallRuleGroupOutput)
   289  }
   290  
   291  type ResolverFirewallRuleGroupMapOutput struct{ *pulumi.OutputState }
   292  
   293  func (ResolverFirewallRuleGroupMapOutput) ElementType() reflect.Type {
   294  	return reflect.TypeOf((*map[string]*ResolverFirewallRuleGroup)(nil)).Elem()
   295  }
   296  
   297  func (o ResolverFirewallRuleGroupMapOutput) ToResolverFirewallRuleGroupMapOutput() ResolverFirewallRuleGroupMapOutput {
   298  	return o
   299  }
   300  
   301  func (o ResolverFirewallRuleGroupMapOutput) ToResolverFirewallRuleGroupMapOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupMapOutput {
   302  	return o
   303  }
   304  
   305  func (o ResolverFirewallRuleGroupMapOutput) MapIndex(k pulumi.StringInput) ResolverFirewallRuleGroupOutput {
   306  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResolverFirewallRuleGroup {
   307  		return vs[0].(map[string]*ResolverFirewallRuleGroup)[vs[1].(string)]
   308  	}).(ResolverFirewallRuleGroupOutput)
   309  }
   310  
   311  func init() {
   312  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverFirewallRuleGroupInput)(nil)).Elem(), &ResolverFirewallRuleGroup{})
   313  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverFirewallRuleGroupArrayInput)(nil)).Elem(), ResolverFirewallRuleGroupArray{})
   314  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverFirewallRuleGroupMapInput)(nil)).Elem(), ResolverFirewallRuleGroupMap{})
   315  	pulumi.RegisterOutputType(ResolverFirewallRuleGroupOutput{})
   316  	pulumi.RegisterOutputType(ResolverFirewallRuleGroupArrayOutput{})
   317  	pulumi.RegisterOutputType(ResolverFirewallRuleGroupMapOutput{})
   318  }