github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/mediaconvert/queue.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 mediaconvert
     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 an AWS Elemental MediaConvert Queue.
    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/mediaconvert"
    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 := mediaconvert.NewQueue(ctx, "test", &mediaconvert.QueueArgs{
    32  //				Name: pulumi.String("tf-test-queue"),
    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 Media Convert Queue using the queue name. For example:
    47  //
    48  // ```sh
    49  // $ pulumi import aws:mediaconvert/queue:Queue test tf-test-queue
    50  // ```
    51  type Queue struct {
    52  	pulumi.CustomResourceState
    53  
    54  	// The Arn of the queue
    55  	Arn pulumi.StringOutput `pulumi:"arn"`
    56  	// A description of the queue
    57  	Description pulumi.StringPtrOutput `pulumi:"description"`
    58  	// A unique identifier describing the queue
    59  	Name pulumi.StringOutput `pulumi:"name"`
    60  	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
    61  	PricingPlan pulumi.StringPtrOutput `pulumi:"pricingPlan"`
    62  	// A detail pricing plan of the  reserved queue. See below.
    63  	ReservationPlanSettings QueueReservationPlanSettingsOutput `pulumi:"reservationPlanSettings"`
    64  	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
    65  	Status pulumi.StringPtrOutput `pulumi:"status"`
    66  	// 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.
    67  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    68  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    69  	//
    70  	// Deprecated: Please use `tags` instead.
    71  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    72  }
    73  
    74  // NewQueue registers a new resource with the given unique name, arguments, and options.
    75  func NewQueue(ctx *pulumi.Context,
    76  	name string, args *QueueArgs, opts ...pulumi.ResourceOption) (*Queue, error) {
    77  	if args == nil {
    78  		args = &QueueArgs{}
    79  	}
    80  
    81  	opts = internal.PkgResourceDefaultOpts(opts)
    82  	var resource Queue
    83  	err := ctx.RegisterResource("aws:mediaconvert/queue:Queue", name, args, &resource, opts...)
    84  	if err != nil {
    85  		return nil, err
    86  	}
    87  	return &resource, nil
    88  }
    89  
    90  // GetQueue gets an existing Queue resource's state with the given name, ID, and optional
    91  // state properties that are used to uniquely qualify the lookup (nil if not required).
    92  func GetQueue(ctx *pulumi.Context,
    93  	name string, id pulumi.IDInput, state *QueueState, opts ...pulumi.ResourceOption) (*Queue, error) {
    94  	var resource Queue
    95  	err := ctx.ReadResource("aws:mediaconvert/queue:Queue", name, id, state, &resource, opts...)
    96  	if err != nil {
    97  		return nil, err
    98  	}
    99  	return &resource, nil
   100  }
   101  
   102  // Input properties used for looking up and filtering Queue resources.
   103  type queueState struct {
   104  	// The Arn of the queue
   105  	Arn *string `pulumi:"arn"`
   106  	// A description of the queue
   107  	Description *string `pulumi:"description"`
   108  	// A unique identifier describing the queue
   109  	Name *string `pulumi:"name"`
   110  	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
   111  	PricingPlan *string `pulumi:"pricingPlan"`
   112  	// A detail pricing plan of the  reserved queue. See below.
   113  	ReservationPlanSettings *QueueReservationPlanSettings `pulumi:"reservationPlanSettings"`
   114  	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
   115  	Status *string `pulumi:"status"`
   116  	// 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.
   117  	Tags map[string]string `pulumi:"tags"`
   118  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   119  	//
   120  	// Deprecated: Please use `tags` instead.
   121  	TagsAll map[string]string `pulumi:"tagsAll"`
   122  }
   123  
   124  type QueueState struct {
   125  	// The Arn of the queue
   126  	Arn pulumi.StringPtrInput
   127  	// A description of the queue
   128  	Description pulumi.StringPtrInput
   129  	// A unique identifier describing the queue
   130  	Name pulumi.StringPtrInput
   131  	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
   132  	PricingPlan pulumi.StringPtrInput
   133  	// A detail pricing plan of the  reserved queue. See below.
   134  	ReservationPlanSettings QueueReservationPlanSettingsPtrInput
   135  	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
   136  	Status pulumi.StringPtrInput
   137  	// 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.
   138  	Tags pulumi.StringMapInput
   139  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   140  	//
   141  	// Deprecated: Please use `tags` instead.
   142  	TagsAll pulumi.StringMapInput
   143  }
   144  
   145  func (QueueState) ElementType() reflect.Type {
   146  	return reflect.TypeOf((*queueState)(nil)).Elem()
   147  }
   148  
   149  type queueArgs struct {
   150  	// A description of the queue
   151  	Description *string `pulumi:"description"`
   152  	// A unique identifier describing the queue
   153  	Name *string `pulumi:"name"`
   154  	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
   155  	PricingPlan *string `pulumi:"pricingPlan"`
   156  	// A detail pricing plan of the  reserved queue. See below.
   157  	ReservationPlanSettings *QueueReservationPlanSettings `pulumi:"reservationPlanSettings"`
   158  	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
   159  	Status *string `pulumi:"status"`
   160  	// 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.
   161  	Tags map[string]string `pulumi:"tags"`
   162  }
   163  
   164  // The set of arguments for constructing a Queue resource.
   165  type QueueArgs struct {
   166  	// A description of the queue
   167  	Description pulumi.StringPtrInput
   168  	// A unique identifier describing the queue
   169  	Name pulumi.StringPtrInput
   170  	// Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
   171  	PricingPlan pulumi.StringPtrInput
   172  	// A detail pricing plan of the  reserved queue. See below.
   173  	ReservationPlanSettings QueueReservationPlanSettingsPtrInput
   174  	// A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
   175  	Status pulumi.StringPtrInput
   176  	// 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.
   177  	Tags pulumi.StringMapInput
   178  }
   179  
   180  func (QueueArgs) ElementType() reflect.Type {
   181  	return reflect.TypeOf((*queueArgs)(nil)).Elem()
   182  }
   183  
   184  type QueueInput interface {
   185  	pulumi.Input
   186  
   187  	ToQueueOutput() QueueOutput
   188  	ToQueueOutputWithContext(ctx context.Context) QueueOutput
   189  }
   190  
   191  func (*Queue) ElementType() reflect.Type {
   192  	return reflect.TypeOf((**Queue)(nil)).Elem()
   193  }
   194  
   195  func (i *Queue) ToQueueOutput() QueueOutput {
   196  	return i.ToQueueOutputWithContext(context.Background())
   197  }
   198  
   199  func (i *Queue) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
   200  	return pulumi.ToOutputWithContext(ctx, i).(QueueOutput)
   201  }
   202  
   203  // QueueArrayInput is an input type that accepts QueueArray and QueueArrayOutput values.
   204  // You can construct a concrete instance of `QueueArrayInput` via:
   205  //
   206  //	QueueArray{ QueueArgs{...} }
   207  type QueueArrayInput interface {
   208  	pulumi.Input
   209  
   210  	ToQueueArrayOutput() QueueArrayOutput
   211  	ToQueueArrayOutputWithContext(context.Context) QueueArrayOutput
   212  }
   213  
   214  type QueueArray []QueueInput
   215  
   216  func (QueueArray) ElementType() reflect.Type {
   217  	return reflect.TypeOf((*[]*Queue)(nil)).Elem()
   218  }
   219  
   220  func (i QueueArray) ToQueueArrayOutput() QueueArrayOutput {
   221  	return i.ToQueueArrayOutputWithContext(context.Background())
   222  }
   223  
   224  func (i QueueArray) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
   225  	return pulumi.ToOutputWithContext(ctx, i).(QueueArrayOutput)
   226  }
   227  
   228  // QueueMapInput is an input type that accepts QueueMap and QueueMapOutput values.
   229  // You can construct a concrete instance of `QueueMapInput` via:
   230  //
   231  //	QueueMap{ "key": QueueArgs{...} }
   232  type QueueMapInput interface {
   233  	pulumi.Input
   234  
   235  	ToQueueMapOutput() QueueMapOutput
   236  	ToQueueMapOutputWithContext(context.Context) QueueMapOutput
   237  }
   238  
   239  type QueueMap map[string]QueueInput
   240  
   241  func (QueueMap) ElementType() reflect.Type {
   242  	return reflect.TypeOf((*map[string]*Queue)(nil)).Elem()
   243  }
   244  
   245  func (i QueueMap) ToQueueMapOutput() QueueMapOutput {
   246  	return i.ToQueueMapOutputWithContext(context.Background())
   247  }
   248  
   249  func (i QueueMap) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
   250  	return pulumi.ToOutputWithContext(ctx, i).(QueueMapOutput)
   251  }
   252  
   253  type QueueOutput struct{ *pulumi.OutputState }
   254  
   255  func (QueueOutput) ElementType() reflect.Type {
   256  	return reflect.TypeOf((**Queue)(nil)).Elem()
   257  }
   258  
   259  func (o QueueOutput) ToQueueOutput() QueueOutput {
   260  	return o
   261  }
   262  
   263  func (o QueueOutput) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
   264  	return o
   265  }
   266  
   267  // The Arn of the queue
   268  func (o QueueOutput) Arn() pulumi.StringOutput {
   269  	return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   270  }
   271  
   272  // A description of the queue
   273  func (o QueueOutput) Description() pulumi.StringPtrOutput {
   274  	return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   275  }
   276  
   277  // A unique identifier describing the queue
   278  func (o QueueOutput) Name() pulumi.StringOutput {
   279  	return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   280  }
   281  
   282  // Specifies whether the pricing plan for the queue is on-demand or reserved. Valid values are `ON_DEMAND` or `RESERVED`. Default to `ON_DEMAND`.
   283  func (o QueueOutput) PricingPlan() pulumi.StringPtrOutput {
   284  	return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.PricingPlan }).(pulumi.StringPtrOutput)
   285  }
   286  
   287  // A detail pricing plan of the  reserved queue. See below.
   288  func (o QueueOutput) ReservationPlanSettings() QueueReservationPlanSettingsOutput {
   289  	return o.ApplyT(func(v *Queue) QueueReservationPlanSettingsOutput { return v.ReservationPlanSettings }).(QueueReservationPlanSettingsOutput)
   290  }
   291  
   292  // A status of the queue. Valid values are `ACTIVE` or `RESERVED`. Default to `PAUSED`.
   293  func (o QueueOutput) Status() pulumi.StringPtrOutput {
   294  	return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
   295  }
   296  
   297  // 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.
   298  func (o QueueOutput) Tags() pulumi.StringMapOutput {
   299  	return o.ApplyT(func(v *Queue) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   300  }
   301  
   302  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   303  //
   304  // Deprecated: Please use `tags` instead.
   305  func (o QueueOutput) TagsAll() pulumi.StringMapOutput {
   306  	return o.ApplyT(func(v *Queue) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   307  }
   308  
   309  type QueueArrayOutput struct{ *pulumi.OutputState }
   310  
   311  func (QueueArrayOutput) ElementType() reflect.Type {
   312  	return reflect.TypeOf((*[]*Queue)(nil)).Elem()
   313  }
   314  
   315  func (o QueueArrayOutput) ToQueueArrayOutput() QueueArrayOutput {
   316  	return o
   317  }
   318  
   319  func (o QueueArrayOutput) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
   320  	return o
   321  }
   322  
   323  func (o QueueArrayOutput) Index(i pulumi.IntInput) QueueOutput {
   324  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Queue {
   325  		return vs[0].([]*Queue)[vs[1].(int)]
   326  	}).(QueueOutput)
   327  }
   328  
   329  type QueueMapOutput struct{ *pulumi.OutputState }
   330  
   331  func (QueueMapOutput) ElementType() reflect.Type {
   332  	return reflect.TypeOf((*map[string]*Queue)(nil)).Elem()
   333  }
   334  
   335  func (o QueueMapOutput) ToQueueMapOutput() QueueMapOutput {
   336  	return o
   337  }
   338  
   339  func (o QueueMapOutput) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
   340  	return o
   341  }
   342  
   343  func (o QueueMapOutput) MapIndex(k pulumi.StringInput) QueueOutput {
   344  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Queue {
   345  		return vs[0].(map[string]*Queue)[vs[1].(string)]
   346  	}).(QueueOutput)
   347  }
   348  
   349  func init() {
   350  	pulumi.RegisterInputType(reflect.TypeOf((*QueueInput)(nil)).Elem(), &Queue{})
   351  	pulumi.RegisterInputType(reflect.TypeOf((*QueueArrayInput)(nil)).Elem(), QueueArray{})
   352  	pulumi.RegisterInputType(reflect.TypeOf((*QueueMapInput)(nil)).Elem(), QueueMap{})
   353  	pulumi.RegisterOutputType(QueueOutput{})
   354  	pulumi.RegisterOutputType(QueueArrayOutput{})
   355  	pulumi.RegisterOutputType(QueueMapOutput{})
   356  }