github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sagemaker/modelPackageGroup.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 sagemaker
     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 SageMaker Model Package Group resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sagemaker"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			_, err := sagemaker.NewModelPackageGroup(ctx, "example", &sagemaker.ModelPackageGroupArgs{
    35  //				ModelPackageGroupName: pulumi.String("example"),
    36  //			})
    37  //			if err != nil {
    38  //				return err
    39  //			}
    40  //			return nil
    41  //		})
    42  //	}
    43  //
    44  // ```
    45  // <!--End PulumiCodeChooser -->
    46  //
    47  // ## Import
    48  //
    49  // Using `pulumi import`, import SageMaker Model Package Groups using the `name`. For example:
    50  //
    51  // ```sh
    52  // $ pulumi import aws:sagemaker/modelPackageGroup:ModelPackageGroup test_model_package_group my-code-repo
    53  // ```
    54  type ModelPackageGroup struct {
    55  	pulumi.CustomResourceState
    56  
    57  	// The Amazon Resource Name (ARN) assigned by AWS to this Model Package Group.
    58  	Arn pulumi.StringOutput `pulumi:"arn"`
    59  	// A description for the model group.
    60  	ModelPackageGroupDescription pulumi.StringPtrOutput `pulumi:"modelPackageGroupDescription"`
    61  	// The name of the model group.
    62  	ModelPackageGroupName pulumi.StringOutput `pulumi:"modelPackageGroupName"`
    63  	// 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.
    64  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    65  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    66  	//
    67  	// Deprecated: Please use `tags` instead.
    68  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    69  }
    70  
    71  // NewModelPackageGroup registers a new resource with the given unique name, arguments, and options.
    72  func NewModelPackageGroup(ctx *pulumi.Context,
    73  	name string, args *ModelPackageGroupArgs, opts ...pulumi.ResourceOption) (*ModelPackageGroup, error) {
    74  	if args == nil {
    75  		return nil, errors.New("missing one or more required arguments")
    76  	}
    77  
    78  	if args.ModelPackageGroupName == nil {
    79  		return nil, errors.New("invalid value for required argument 'ModelPackageGroupName'")
    80  	}
    81  	opts = internal.PkgResourceDefaultOpts(opts)
    82  	var resource ModelPackageGroup
    83  	err := ctx.RegisterResource("aws:sagemaker/modelPackageGroup:ModelPackageGroup", name, args, &resource, opts...)
    84  	if err != nil {
    85  		return nil, err
    86  	}
    87  	return &resource, nil
    88  }
    89  
    90  // GetModelPackageGroup gets an existing ModelPackageGroup 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 GetModelPackageGroup(ctx *pulumi.Context,
    93  	name string, id pulumi.IDInput, state *ModelPackageGroupState, opts ...pulumi.ResourceOption) (*ModelPackageGroup, error) {
    94  	var resource ModelPackageGroup
    95  	err := ctx.ReadResource("aws:sagemaker/modelPackageGroup:ModelPackageGroup", 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 ModelPackageGroup resources.
   103  type modelPackageGroupState struct {
   104  	// The Amazon Resource Name (ARN) assigned by AWS to this Model Package Group.
   105  	Arn *string `pulumi:"arn"`
   106  	// A description for the model group.
   107  	ModelPackageGroupDescription *string `pulumi:"modelPackageGroupDescription"`
   108  	// The name of the model group.
   109  	ModelPackageGroupName *string `pulumi:"modelPackageGroupName"`
   110  	// 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.
   111  	Tags map[string]string `pulumi:"tags"`
   112  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   113  	//
   114  	// Deprecated: Please use `tags` instead.
   115  	TagsAll map[string]string `pulumi:"tagsAll"`
   116  }
   117  
   118  type ModelPackageGroupState struct {
   119  	// The Amazon Resource Name (ARN) assigned by AWS to this Model Package Group.
   120  	Arn pulumi.StringPtrInput
   121  	// A description for the model group.
   122  	ModelPackageGroupDescription pulumi.StringPtrInput
   123  	// The name of the model group.
   124  	ModelPackageGroupName 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 (ModelPackageGroupState) ElementType() reflect.Type {
   134  	return reflect.TypeOf((*modelPackageGroupState)(nil)).Elem()
   135  }
   136  
   137  type modelPackageGroupArgs struct {
   138  	// A description for the model group.
   139  	ModelPackageGroupDescription *string `pulumi:"modelPackageGroupDescription"`
   140  	// The name of the model group.
   141  	ModelPackageGroupName string `pulumi:"modelPackageGroupName"`
   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 map[string]string `pulumi:"tags"`
   144  }
   145  
   146  // The set of arguments for constructing a ModelPackageGroup resource.
   147  type ModelPackageGroupArgs struct {
   148  	// A description for the model group.
   149  	ModelPackageGroupDescription pulumi.StringPtrInput
   150  	// The name of the model group.
   151  	ModelPackageGroupName pulumi.StringInput
   152  	// 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.
   153  	Tags pulumi.StringMapInput
   154  }
   155  
   156  func (ModelPackageGroupArgs) ElementType() reflect.Type {
   157  	return reflect.TypeOf((*modelPackageGroupArgs)(nil)).Elem()
   158  }
   159  
   160  type ModelPackageGroupInput interface {
   161  	pulumi.Input
   162  
   163  	ToModelPackageGroupOutput() ModelPackageGroupOutput
   164  	ToModelPackageGroupOutputWithContext(ctx context.Context) ModelPackageGroupOutput
   165  }
   166  
   167  func (*ModelPackageGroup) ElementType() reflect.Type {
   168  	return reflect.TypeOf((**ModelPackageGroup)(nil)).Elem()
   169  }
   170  
   171  func (i *ModelPackageGroup) ToModelPackageGroupOutput() ModelPackageGroupOutput {
   172  	return i.ToModelPackageGroupOutputWithContext(context.Background())
   173  }
   174  
   175  func (i *ModelPackageGroup) ToModelPackageGroupOutputWithContext(ctx context.Context) ModelPackageGroupOutput {
   176  	return pulumi.ToOutputWithContext(ctx, i).(ModelPackageGroupOutput)
   177  }
   178  
   179  // ModelPackageGroupArrayInput is an input type that accepts ModelPackageGroupArray and ModelPackageGroupArrayOutput values.
   180  // You can construct a concrete instance of `ModelPackageGroupArrayInput` via:
   181  //
   182  //	ModelPackageGroupArray{ ModelPackageGroupArgs{...} }
   183  type ModelPackageGroupArrayInput interface {
   184  	pulumi.Input
   185  
   186  	ToModelPackageGroupArrayOutput() ModelPackageGroupArrayOutput
   187  	ToModelPackageGroupArrayOutputWithContext(context.Context) ModelPackageGroupArrayOutput
   188  }
   189  
   190  type ModelPackageGroupArray []ModelPackageGroupInput
   191  
   192  func (ModelPackageGroupArray) ElementType() reflect.Type {
   193  	return reflect.TypeOf((*[]*ModelPackageGroup)(nil)).Elem()
   194  }
   195  
   196  func (i ModelPackageGroupArray) ToModelPackageGroupArrayOutput() ModelPackageGroupArrayOutput {
   197  	return i.ToModelPackageGroupArrayOutputWithContext(context.Background())
   198  }
   199  
   200  func (i ModelPackageGroupArray) ToModelPackageGroupArrayOutputWithContext(ctx context.Context) ModelPackageGroupArrayOutput {
   201  	return pulumi.ToOutputWithContext(ctx, i).(ModelPackageGroupArrayOutput)
   202  }
   203  
   204  // ModelPackageGroupMapInput is an input type that accepts ModelPackageGroupMap and ModelPackageGroupMapOutput values.
   205  // You can construct a concrete instance of `ModelPackageGroupMapInput` via:
   206  //
   207  //	ModelPackageGroupMap{ "key": ModelPackageGroupArgs{...} }
   208  type ModelPackageGroupMapInput interface {
   209  	pulumi.Input
   210  
   211  	ToModelPackageGroupMapOutput() ModelPackageGroupMapOutput
   212  	ToModelPackageGroupMapOutputWithContext(context.Context) ModelPackageGroupMapOutput
   213  }
   214  
   215  type ModelPackageGroupMap map[string]ModelPackageGroupInput
   216  
   217  func (ModelPackageGroupMap) ElementType() reflect.Type {
   218  	return reflect.TypeOf((*map[string]*ModelPackageGroup)(nil)).Elem()
   219  }
   220  
   221  func (i ModelPackageGroupMap) ToModelPackageGroupMapOutput() ModelPackageGroupMapOutput {
   222  	return i.ToModelPackageGroupMapOutputWithContext(context.Background())
   223  }
   224  
   225  func (i ModelPackageGroupMap) ToModelPackageGroupMapOutputWithContext(ctx context.Context) ModelPackageGroupMapOutput {
   226  	return pulumi.ToOutputWithContext(ctx, i).(ModelPackageGroupMapOutput)
   227  }
   228  
   229  type ModelPackageGroupOutput struct{ *pulumi.OutputState }
   230  
   231  func (ModelPackageGroupOutput) ElementType() reflect.Type {
   232  	return reflect.TypeOf((**ModelPackageGroup)(nil)).Elem()
   233  }
   234  
   235  func (o ModelPackageGroupOutput) ToModelPackageGroupOutput() ModelPackageGroupOutput {
   236  	return o
   237  }
   238  
   239  func (o ModelPackageGroupOutput) ToModelPackageGroupOutputWithContext(ctx context.Context) ModelPackageGroupOutput {
   240  	return o
   241  }
   242  
   243  // The Amazon Resource Name (ARN) assigned by AWS to this Model Package Group.
   244  func (o ModelPackageGroupOutput) Arn() pulumi.StringOutput {
   245  	return o.ApplyT(func(v *ModelPackageGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   246  }
   247  
   248  // A description for the model group.
   249  func (o ModelPackageGroupOutput) ModelPackageGroupDescription() pulumi.StringPtrOutput {
   250  	return o.ApplyT(func(v *ModelPackageGroup) pulumi.StringPtrOutput { return v.ModelPackageGroupDescription }).(pulumi.StringPtrOutput)
   251  }
   252  
   253  // The name of the model group.
   254  func (o ModelPackageGroupOutput) ModelPackageGroupName() pulumi.StringOutput {
   255  	return o.ApplyT(func(v *ModelPackageGroup) pulumi.StringOutput { return v.ModelPackageGroupName }).(pulumi.StringOutput)
   256  }
   257  
   258  // 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.
   259  func (o ModelPackageGroupOutput) Tags() pulumi.StringMapOutput {
   260  	return o.ApplyT(func(v *ModelPackageGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   261  }
   262  
   263  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   264  //
   265  // Deprecated: Please use `tags` instead.
   266  func (o ModelPackageGroupOutput) TagsAll() pulumi.StringMapOutput {
   267  	return o.ApplyT(func(v *ModelPackageGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   268  }
   269  
   270  type ModelPackageGroupArrayOutput struct{ *pulumi.OutputState }
   271  
   272  func (ModelPackageGroupArrayOutput) ElementType() reflect.Type {
   273  	return reflect.TypeOf((*[]*ModelPackageGroup)(nil)).Elem()
   274  }
   275  
   276  func (o ModelPackageGroupArrayOutput) ToModelPackageGroupArrayOutput() ModelPackageGroupArrayOutput {
   277  	return o
   278  }
   279  
   280  func (o ModelPackageGroupArrayOutput) ToModelPackageGroupArrayOutputWithContext(ctx context.Context) ModelPackageGroupArrayOutput {
   281  	return o
   282  }
   283  
   284  func (o ModelPackageGroupArrayOutput) Index(i pulumi.IntInput) ModelPackageGroupOutput {
   285  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ModelPackageGroup {
   286  		return vs[0].([]*ModelPackageGroup)[vs[1].(int)]
   287  	}).(ModelPackageGroupOutput)
   288  }
   289  
   290  type ModelPackageGroupMapOutput struct{ *pulumi.OutputState }
   291  
   292  func (ModelPackageGroupMapOutput) ElementType() reflect.Type {
   293  	return reflect.TypeOf((*map[string]*ModelPackageGroup)(nil)).Elem()
   294  }
   295  
   296  func (o ModelPackageGroupMapOutput) ToModelPackageGroupMapOutput() ModelPackageGroupMapOutput {
   297  	return o
   298  }
   299  
   300  func (o ModelPackageGroupMapOutput) ToModelPackageGroupMapOutputWithContext(ctx context.Context) ModelPackageGroupMapOutput {
   301  	return o
   302  }
   303  
   304  func (o ModelPackageGroupMapOutput) MapIndex(k pulumi.StringInput) ModelPackageGroupOutput {
   305  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ModelPackageGroup {
   306  		return vs[0].(map[string]*ModelPackageGroup)[vs[1].(string)]
   307  	}).(ModelPackageGroupOutput)
   308  }
   309  
   310  func init() {
   311  	pulumi.RegisterInputType(reflect.TypeOf((*ModelPackageGroupInput)(nil)).Elem(), &ModelPackageGroup{})
   312  	pulumi.RegisterInputType(reflect.TypeOf((*ModelPackageGroupArrayInput)(nil)).Elem(), ModelPackageGroupArray{})
   313  	pulumi.RegisterInputType(reflect.TypeOf((*ModelPackageGroupMapInput)(nil)).Elem(), ModelPackageGroupMap{})
   314  	pulumi.RegisterOutputType(ModelPackageGroupOutput{})
   315  	pulumi.RegisterOutputType(ModelPackageGroupArrayOutput{})
   316  	pulumi.RegisterOutputType(ModelPackageGroupMapOutput{})
   317  }