github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/mediastore/container.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 mediastore
     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 MediaStore Container.
    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/mediastore"
    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 := mediastore.NewContainer(ctx, "example", &mediastore.ContainerArgs{
    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 MediaStore Container using the MediaStore Container Name. For example:
    47  //
    48  // ```sh
    49  // $ pulumi import aws:mediastore/container:Container example example
    50  // ```
    51  type Container struct {
    52  	pulumi.CustomResourceState
    53  
    54  	// The ARN of the container.
    55  	Arn pulumi.StringOutput `pulumi:"arn"`
    56  	// The DNS endpoint of the container.
    57  	Endpoint pulumi.StringOutput `pulumi:"endpoint"`
    58  	// The name of the container. Must contain alphanumeric characters or underscores.
    59  	Name pulumi.StringOutput `pulumi:"name"`
    60  	// 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.
    61  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    62  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    63  	//
    64  	// Deprecated: Please use `tags` instead.
    65  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    66  }
    67  
    68  // NewContainer registers a new resource with the given unique name, arguments, and options.
    69  func NewContainer(ctx *pulumi.Context,
    70  	name string, args *ContainerArgs, opts ...pulumi.ResourceOption) (*Container, error) {
    71  	if args == nil {
    72  		args = &ContainerArgs{}
    73  	}
    74  
    75  	opts = internal.PkgResourceDefaultOpts(opts)
    76  	var resource Container
    77  	err := ctx.RegisterResource("aws:mediastore/container:Container", name, args, &resource, opts...)
    78  	if err != nil {
    79  		return nil, err
    80  	}
    81  	return &resource, nil
    82  }
    83  
    84  // GetContainer gets an existing Container resource's state with the given name, ID, and optional
    85  // state properties that are used to uniquely qualify the lookup (nil if not required).
    86  func GetContainer(ctx *pulumi.Context,
    87  	name string, id pulumi.IDInput, state *ContainerState, opts ...pulumi.ResourceOption) (*Container, error) {
    88  	var resource Container
    89  	err := ctx.ReadResource("aws:mediastore/container:Container", name, id, state, &resource, opts...)
    90  	if err != nil {
    91  		return nil, err
    92  	}
    93  	return &resource, nil
    94  }
    95  
    96  // Input properties used for looking up and filtering Container resources.
    97  type containerState struct {
    98  	// The ARN of the container.
    99  	Arn *string `pulumi:"arn"`
   100  	// The DNS endpoint of the container.
   101  	Endpoint *string `pulumi:"endpoint"`
   102  	// The name of the container. Must contain alphanumeric characters or underscores.
   103  	Name *string `pulumi:"name"`
   104  	// 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.
   105  	Tags map[string]string `pulumi:"tags"`
   106  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   107  	//
   108  	// Deprecated: Please use `tags` instead.
   109  	TagsAll map[string]string `pulumi:"tagsAll"`
   110  }
   111  
   112  type ContainerState struct {
   113  	// The ARN of the container.
   114  	Arn pulumi.StringPtrInput
   115  	// The DNS endpoint of the container.
   116  	Endpoint pulumi.StringPtrInput
   117  	// The name of the container. Must contain alphanumeric characters or underscores.
   118  	Name pulumi.StringPtrInput
   119  	// 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.
   120  	Tags pulumi.StringMapInput
   121  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   122  	//
   123  	// Deprecated: Please use `tags` instead.
   124  	TagsAll pulumi.StringMapInput
   125  }
   126  
   127  func (ContainerState) ElementType() reflect.Type {
   128  	return reflect.TypeOf((*containerState)(nil)).Elem()
   129  }
   130  
   131  type containerArgs struct {
   132  	// The name of the container. Must contain alphanumeric characters or underscores.
   133  	Name *string `pulumi:"name"`
   134  	// 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.
   135  	Tags map[string]string `pulumi:"tags"`
   136  }
   137  
   138  // The set of arguments for constructing a Container resource.
   139  type ContainerArgs struct {
   140  	// The name of the container. Must contain alphanumeric characters or underscores.
   141  	Name pulumi.StringPtrInput
   142  	// 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.
   143  	Tags pulumi.StringMapInput
   144  }
   145  
   146  func (ContainerArgs) ElementType() reflect.Type {
   147  	return reflect.TypeOf((*containerArgs)(nil)).Elem()
   148  }
   149  
   150  type ContainerInput interface {
   151  	pulumi.Input
   152  
   153  	ToContainerOutput() ContainerOutput
   154  	ToContainerOutputWithContext(ctx context.Context) ContainerOutput
   155  }
   156  
   157  func (*Container) ElementType() reflect.Type {
   158  	return reflect.TypeOf((**Container)(nil)).Elem()
   159  }
   160  
   161  func (i *Container) ToContainerOutput() ContainerOutput {
   162  	return i.ToContainerOutputWithContext(context.Background())
   163  }
   164  
   165  func (i *Container) ToContainerOutputWithContext(ctx context.Context) ContainerOutput {
   166  	return pulumi.ToOutputWithContext(ctx, i).(ContainerOutput)
   167  }
   168  
   169  // ContainerArrayInput is an input type that accepts ContainerArray and ContainerArrayOutput values.
   170  // You can construct a concrete instance of `ContainerArrayInput` via:
   171  //
   172  //	ContainerArray{ ContainerArgs{...} }
   173  type ContainerArrayInput interface {
   174  	pulumi.Input
   175  
   176  	ToContainerArrayOutput() ContainerArrayOutput
   177  	ToContainerArrayOutputWithContext(context.Context) ContainerArrayOutput
   178  }
   179  
   180  type ContainerArray []ContainerInput
   181  
   182  func (ContainerArray) ElementType() reflect.Type {
   183  	return reflect.TypeOf((*[]*Container)(nil)).Elem()
   184  }
   185  
   186  func (i ContainerArray) ToContainerArrayOutput() ContainerArrayOutput {
   187  	return i.ToContainerArrayOutputWithContext(context.Background())
   188  }
   189  
   190  func (i ContainerArray) ToContainerArrayOutputWithContext(ctx context.Context) ContainerArrayOutput {
   191  	return pulumi.ToOutputWithContext(ctx, i).(ContainerArrayOutput)
   192  }
   193  
   194  // ContainerMapInput is an input type that accepts ContainerMap and ContainerMapOutput values.
   195  // You can construct a concrete instance of `ContainerMapInput` via:
   196  //
   197  //	ContainerMap{ "key": ContainerArgs{...} }
   198  type ContainerMapInput interface {
   199  	pulumi.Input
   200  
   201  	ToContainerMapOutput() ContainerMapOutput
   202  	ToContainerMapOutputWithContext(context.Context) ContainerMapOutput
   203  }
   204  
   205  type ContainerMap map[string]ContainerInput
   206  
   207  func (ContainerMap) ElementType() reflect.Type {
   208  	return reflect.TypeOf((*map[string]*Container)(nil)).Elem()
   209  }
   210  
   211  func (i ContainerMap) ToContainerMapOutput() ContainerMapOutput {
   212  	return i.ToContainerMapOutputWithContext(context.Background())
   213  }
   214  
   215  func (i ContainerMap) ToContainerMapOutputWithContext(ctx context.Context) ContainerMapOutput {
   216  	return pulumi.ToOutputWithContext(ctx, i).(ContainerMapOutput)
   217  }
   218  
   219  type ContainerOutput struct{ *pulumi.OutputState }
   220  
   221  func (ContainerOutput) ElementType() reflect.Type {
   222  	return reflect.TypeOf((**Container)(nil)).Elem()
   223  }
   224  
   225  func (o ContainerOutput) ToContainerOutput() ContainerOutput {
   226  	return o
   227  }
   228  
   229  func (o ContainerOutput) ToContainerOutputWithContext(ctx context.Context) ContainerOutput {
   230  	return o
   231  }
   232  
   233  // The ARN of the container.
   234  func (o ContainerOutput) Arn() pulumi.StringOutput {
   235  	return o.ApplyT(func(v *Container) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   236  }
   237  
   238  // The DNS endpoint of the container.
   239  func (o ContainerOutput) Endpoint() pulumi.StringOutput {
   240  	return o.ApplyT(func(v *Container) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
   241  }
   242  
   243  // The name of the container. Must contain alphanumeric characters or underscores.
   244  func (o ContainerOutput) Name() pulumi.StringOutput {
   245  	return o.ApplyT(func(v *Container) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   246  }
   247  
   248  // 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.
   249  func (o ContainerOutput) Tags() pulumi.StringMapOutput {
   250  	return o.ApplyT(func(v *Container) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   251  }
   252  
   253  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   254  //
   255  // Deprecated: Please use `tags` instead.
   256  func (o ContainerOutput) TagsAll() pulumi.StringMapOutput {
   257  	return o.ApplyT(func(v *Container) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   258  }
   259  
   260  type ContainerArrayOutput struct{ *pulumi.OutputState }
   261  
   262  func (ContainerArrayOutput) ElementType() reflect.Type {
   263  	return reflect.TypeOf((*[]*Container)(nil)).Elem()
   264  }
   265  
   266  func (o ContainerArrayOutput) ToContainerArrayOutput() ContainerArrayOutput {
   267  	return o
   268  }
   269  
   270  func (o ContainerArrayOutput) ToContainerArrayOutputWithContext(ctx context.Context) ContainerArrayOutput {
   271  	return o
   272  }
   273  
   274  func (o ContainerArrayOutput) Index(i pulumi.IntInput) ContainerOutput {
   275  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Container {
   276  		return vs[0].([]*Container)[vs[1].(int)]
   277  	}).(ContainerOutput)
   278  }
   279  
   280  type ContainerMapOutput struct{ *pulumi.OutputState }
   281  
   282  func (ContainerMapOutput) ElementType() reflect.Type {
   283  	return reflect.TypeOf((*map[string]*Container)(nil)).Elem()
   284  }
   285  
   286  func (o ContainerMapOutput) ToContainerMapOutput() ContainerMapOutput {
   287  	return o
   288  }
   289  
   290  func (o ContainerMapOutput) ToContainerMapOutputWithContext(ctx context.Context) ContainerMapOutput {
   291  	return o
   292  }
   293  
   294  func (o ContainerMapOutput) MapIndex(k pulumi.StringInput) ContainerOutput {
   295  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Container {
   296  		return vs[0].(map[string]*Container)[vs[1].(string)]
   297  	}).(ContainerOutput)
   298  }
   299  
   300  func init() {
   301  	pulumi.RegisterInputType(reflect.TypeOf((*ContainerInput)(nil)).Elem(), &Container{})
   302  	pulumi.RegisterInputType(reflect.TypeOf((*ContainerArrayInput)(nil)).Elem(), ContainerArray{})
   303  	pulumi.RegisterInputType(reflect.TypeOf((*ContainerMapInput)(nil)).Elem(), ContainerMap{})
   304  	pulumi.RegisterOutputType(ContainerOutput{})
   305  	pulumi.RegisterOutputType(ContainerArrayOutput{})
   306  	pulumi.RegisterOutputType(ContainerMapOutput{})
   307  }