github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ssm/document.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 ssm
     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 an SSM Document resource
    16  //
    17  // > **NOTE on updating SSM documents:** Only documents with a schema version of 2.0
    18  // or greater can update their content once created, see [SSM Schema Features](http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html#document-schemas-features). To update a document with an older schema version you must recreate the resource. Not all document types support a schema version of 2.0 or greater. Refer to [SSM document schema features and examples](https://docs.aws.amazon.com/systems-manager/latest/userguide/document-schemas-features.html) for information about which schema versions are supported for the respective `documentType`.
    19  //
    20  // ## Example Usage
    21  //
    22  // ### Create an ssm document in JSON format
    23  //
    24  // <!--Start PulumiCodeChooser -->
    25  // ```go
    26  // package main
    27  //
    28  // import (
    29  //
    30  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    31  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    32  //
    33  // )
    34  //
    35  //	func main() {
    36  //		pulumi.Run(func(ctx *pulumi.Context) error {
    37  //			_, err := ssm.NewDocument(ctx, "foo", &ssm.DocumentArgs{
    38  //				Name:         pulumi.String("test_document"),
    39  //				DocumentType: pulumi.String("Command"),
    40  //				Content: pulumi.String(`  {
    41  //	    "schemaVersion": "1.2",
    42  //	    "description": "Check ip configuration of a Linux instance.",
    43  //	    "parameters": {
    44  //
    45  //	    },
    46  //	    "runtimeConfig": {
    47  //	      "aws:runShellScript": {
    48  //	        "properties": [
    49  //	          {
    50  //	            "id": "0.aws:runShellScript",
    51  //	            "runCommand": ["ifconfig"]
    52  //	          }
    53  //	        ]
    54  //	      }
    55  //	    }
    56  //	  }
    57  //
    58  // `),
    59  //
    60  //			})
    61  //			if err != nil {
    62  //				return err
    63  //			}
    64  //			return nil
    65  //		})
    66  //	}
    67  //
    68  // ```
    69  // <!--End PulumiCodeChooser -->
    70  //
    71  // ### Create an ssm document in YAML format
    72  //
    73  // <!--Start PulumiCodeChooser -->
    74  // ```go
    75  // package main
    76  //
    77  // import (
    78  //
    79  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    80  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    81  //
    82  // )
    83  //
    84  //	func main() {
    85  //		pulumi.Run(func(ctx *pulumi.Context) error {
    86  //			_, err := ssm.NewDocument(ctx, "foo", &ssm.DocumentArgs{
    87  //				Name:           pulumi.String("test_document"),
    88  //				DocumentFormat: pulumi.String("YAML"),
    89  //				DocumentType:   pulumi.String("Command"),
    90  //				Content: pulumi.String(`schemaVersion: '1.2'
    91  //
    92  // description: Check ip configuration of a Linux instance.
    93  // parameters: {}
    94  // runtimeConfig:
    95  //
    96  //	'aws:runShellScript':
    97  //	  properties:
    98  //	    - id: '0.aws:runShellScript'
    99  //	      runCommand:
   100  //	        - ifconfig
   101  //
   102  // `),
   103  //
   104  //			})
   105  //			if err != nil {
   106  //				return err
   107  //			}
   108  //			return nil
   109  //		})
   110  //	}
   111  //
   112  // ```
   113  // <!--End PulumiCodeChooser -->
   114  //
   115  // ## Import
   116  //
   117  // Using `pulumi import`, import SSM Documents using the name. For example:
   118  //
   119  // ```sh
   120  // $ pulumi import aws:ssm/document:Document example example
   121  // ```
   122  // The `attachments_source` argument does not have an SSM API method for reading the attachment information detail after creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example:
   123  type Document struct {
   124  	pulumi.CustomResourceState
   125  
   126  	// The Amazon Resource Name (ARN) of the document.
   127  	Arn pulumi.StringOutput `pulumi:"arn"`
   128  	// One or more configuration blocks describing attachments sources to a version of a document. See `attachmentsSource` block below for details.
   129  	AttachmentsSources DocumentAttachmentsSourceArrayOutput `pulumi:"attachmentsSources"`
   130  	// The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
   131  	Content pulumi.StringOutput `pulumi:"content"`
   132  	// The date the document was created.
   133  	CreatedDate pulumi.StringOutput `pulumi:"createdDate"`
   134  	// The default version of the document.
   135  	DefaultVersion pulumi.StringOutput `pulumi:"defaultVersion"`
   136  	// A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
   137  	Description pulumi.StringOutput `pulumi:"description"`
   138  	// The format of the document. Valid values: `JSON`, `TEXT`, `YAML`.
   139  	DocumentFormat pulumi.StringPtrOutput `pulumi:"documentFormat"`
   140  	// The type of the document. For a list of valid values, see the [API Reference](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#systemsmanager-CreateDocument-request-DocumentType).
   141  	DocumentType pulumi.StringOutput `pulumi:"documentType"`
   142  	// The document version.
   143  	DocumentVersion pulumi.StringOutput `pulumi:"documentVersion"`
   144  	// The Sha256 or Sha1 hash created by the system when the document was created.
   145  	Hash pulumi.StringOutput `pulumi:"hash"`
   146  	// The hash type of the document. Valid values: `Sha256`, `Sha1`.
   147  	HashType pulumi.StringOutput `pulumi:"hashType"`
   148  	// The latest version of the document.
   149  	LatestVersion pulumi.StringOutput `pulumi:"latestVersion"`
   150  	// The name of the document.
   151  	Name pulumi.StringOutput `pulumi:"name"`
   152  	// The Amazon Web Services user that created the document.
   153  	Owner pulumi.StringOutput `pulumi:"owner"`
   154  	// One or more configuration blocks describing the parameters for the document. See `parameter` block below for details.
   155  	Parameters DocumentParameterArrayOutput `pulumi:"parameters"`
   156  	// Additional permissions to attach to the document. See Permissions below for details.
   157  	Permissions pulumi.StringMapOutput `pulumi:"permissions"`
   158  	// The list of operating system (OS) platforms compatible with this SSM document. Valid values: `Windows`, `Linux`, `MacOS`.
   159  	PlatformTypes pulumi.StringArrayOutput `pulumi:"platformTypes"`
   160  	// The schema version of the document.
   161  	SchemaVersion pulumi.StringOutput `pulumi:"schemaVersion"`
   162  	// The status of the SSM document. Valid values: `Creating`, `Active`, `Updating`, `Deleting`, `Failed`.
   163  	Status pulumi.StringOutput `pulumi:"status"`
   164  	// A map of tags to assign to the object. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   165  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   166  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   167  	//
   168  	// Deprecated: Please use `tags` instead.
   169  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   170  	// The target type which defines the kinds of resources the document can run on. For example, `/AWS::EC2::Instance`. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
   171  	TargetType pulumi.StringPtrOutput `pulumi:"targetType"`
   172  	// The version of the artifact associated with the document. For example, `12.6`. This value is unique across all versions of a document, and can't be changed.
   173  	VersionName pulumi.StringPtrOutput `pulumi:"versionName"`
   174  }
   175  
   176  // NewDocument registers a new resource with the given unique name, arguments, and options.
   177  func NewDocument(ctx *pulumi.Context,
   178  	name string, args *DocumentArgs, opts ...pulumi.ResourceOption) (*Document, error) {
   179  	if args == nil {
   180  		return nil, errors.New("missing one or more required arguments")
   181  	}
   182  
   183  	if args.Content == nil {
   184  		return nil, errors.New("invalid value for required argument 'Content'")
   185  	}
   186  	if args.DocumentType == nil {
   187  		return nil, errors.New("invalid value for required argument 'DocumentType'")
   188  	}
   189  	opts = internal.PkgResourceDefaultOpts(opts)
   190  	var resource Document
   191  	err := ctx.RegisterResource("aws:ssm/document:Document", name, args, &resource, opts...)
   192  	if err != nil {
   193  		return nil, err
   194  	}
   195  	return &resource, nil
   196  }
   197  
   198  // GetDocument gets an existing Document resource's state with the given name, ID, and optional
   199  // state properties that are used to uniquely qualify the lookup (nil if not required).
   200  func GetDocument(ctx *pulumi.Context,
   201  	name string, id pulumi.IDInput, state *DocumentState, opts ...pulumi.ResourceOption) (*Document, error) {
   202  	var resource Document
   203  	err := ctx.ReadResource("aws:ssm/document:Document", name, id, state, &resource, opts...)
   204  	if err != nil {
   205  		return nil, err
   206  	}
   207  	return &resource, nil
   208  }
   209  
   210  // Input properties used for looking up and filtering Document resources.
   211  type documentState struct {
   212  	// The Amazon Resource Name (ARN) of the document.
   213  	Arn *string `pulumi:"arn"`
   214  	// One or more configuration blocks describing attachments sources to a version of a document. See `attachmentsSource` block below for details.
   215  	AttachmentsSources []DocumentAttachmentsSource `pulumi:"attachmentsSources"`
   216  	// The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
   217  	Content *string `pulumi:"content"`
   218  	// The date the document was created.
   219  	CreatedDate *string `pulumi:"createdDate"`
   220  	// The default version of the document.
   221  	DefaultVersion *string `pulumi:"defaultVersion"`
   222  	// A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
   223  	Description *string `pulumi:"description"`
   224  	// The format of the document. Valid values: `JSON`, `TEXT`, `YAML`.
   225  	DocumentFormat *string `pulumi:"documentFormat"`
   226  	// The type of the document. For a list of valid values, see the [API Reference](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#systemsmanager-CreateDocument-request-DocumentType).
   227  	DocumentType *string `pulumi:"documentType"`
   228  	// The document version.
   229  	DocumentVersion *string `pulumi:"documentVersion"`
   230  	// The Sha256 or Sha1 hash created by the system when the document was created.
   231  	Hash *string `pulumi:"hash"`
   232  	// The hash type of the document. Valid values: `Sha256`, `Sha1`.
   233  	HashType *string `pulumi:"hashType"`
   234  	// The latest version of the document.
   235  	LatestVersion *string `pulumi:"latestVersion"`
   236  	// The name of the document.
   237  	Name *string `pulumi:"name"`
   238  	// The Amazon Web Services user that created the document.
   239  	Owner *string `pulumi:"owner"`
   240  	// One or more configuration blocks describing the parameters for the document. See `parameter` block below for details.
   241  	Parameters []DocumentParameter `pulumi:"parameters"`
   242  	// Additional permissions to attach to the document. See Permissions below for details.
   243  	Permissions map[string]string `pulumi:"permissions"`
   244  	// The list of operating system (OS) platforms compatible with this SSM document. Valid values: `Windows`, `Linux`, `MacOS`.
   245  	PlatformTypes []string `pulumi:"platformTypes"`
   246  	// The schema version of the document.
   247  	SchemaVersion *string `pulumi:"schemaVersion"`
   248  	// The status of the SSM document. Valid values: `Creating`, `Active`, `Updating`, `Deleting`, `Failed`.
   249  	Status *string `pulumi:"status"`
   250  	// A map of tags to assign to the object. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   251  	Tags map[string]string `pulumi:"tags"`
   252  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   253  	//
   254  	// Deprecated: Please use `tags` instead.
   255  	TagsAll map[string]string `pulumi:"tagsAll"`
   256  	// The target type which defines the kinds of resources the document can run on. For example, `/AWS::EC2::Instance`. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
   257  	TargetType *string `pulumi:"targetType"`
   258  	// The version of the artifact associated with the document. For example, `12.6`. This value is unique across all versions of a document, and can't be changed.
   259  	VersionName *string `pulumi:"versionName"`
   260  }
   261  
   262  type DocumentState struct {
   263  	// The Amazon Resource Name (ARN) of the document.
   264  	Arn pulumi.StringPtrInput
   265  	// One or more configuration blocks describing attachments sources to a version of a document. See `attachmentsSource` block below for details.
   266  	AttachmentsSources DocumentAttachmentsSourceArrayInput
   267  	// The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
   268  	Content pulumi.StringPtrInput
   269  	// The date the document was created.
   270  	CreatedDate pulumi.StringPtrInput
   271  	// The default version of the document.
   272  	DefaultVersion pulumi.StringPtrInput
   273  	// A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
   274  	Description pulumi.StringPtrInput
   275  	// The format of the document. Valid values: `JSON`, `TEXT`, `YAML`.
   276  	DocumentFormat pulumi.StringPtrInput
   277  	// The type of the document. For a list of valid values, see the [API Reference](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#systemsmanager-CreateDocument-request-DocumentType).
   278  	DocumentType pulumi.StringPtrInput
   279  	// The document version.
   280  	DocumentVersion pulumi.StringPtrInput
   281  	// The Sha256 or Sha1 hash created by the system when the document was created.
   282  	Hash pulumi.StringPtrInput
   283  	// The hash type of the document. Valid values: `Sha256`, `Sha1`.
   284  	HashType pulumi.StringPtrInput
   285  	// The latest version of the document.
   286  	LatestVersion pulumi.StringPtrInput
   287  	// The name of the document.
   288  	Name pulumi.StringPtrInput
   289  	// The Amazon Web Services user that created the document.
   290  	Owner pulumi.StringPtrInput
   291  	// One or more configuration blocks describing the parameters for the document. See `parameter` block below for details.
   292  	Parameters DocumentParameterArrayInput
   293  	// Additional permissions to attach to the document. See Permissions below for details.
   294  	Permissions pulumi.StringMapInput
   295  	// The list of operating system (OS) platforms compatible with this SSM document. Valid values: `Windows`, `Linux`, `MacOS`.
   296  	PlatformTypes pulumi.StringArrayInput
   297  	// The schema version of the document.
   298  	SchemaVersion pulumi.StringPtrInput
   299  	// The status of the SSM document. Valid values: `Creating`, `Active`, `Updating`, `Deleting`, `Failed`.
   300  	Status pulumi.StringPtrInput
   301  	// A map of tags to assign to the object. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   302  	Tags pulumi.StringMapInput
   303  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   304  	//
   305  	// Deprecated: Please use `tags` instead.
   306  	TagsAll pulumi.StringMapInput
   307  	// The target type which defines the kinds of resources the document can run on. For example, `/AWS::EC2::Instance`. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
   308  	TargetType pulumi.StringPtrInput
   309  	// The version of the artifact associated with the document. For example, `12.6`. This value is unique across all versions of a document, and can't be changed.
   310  	VersionName pulumi.StringPtrInput
   311  }
   312  
   313  func (DocumentState) ElementType() reflect.Type {
   314  	return reflect.TypeOf((*documentState)(nil)).Elem()
   315  }
   316  
   317  type documentArgs struct {
   318  	// One or more configuration blocks describing attachments sources to a version of a document. See `attachmentsSource` block below for details.
   319  	AttachmentsSources []DocumentAttachmentsSource `pulumi:"attachmentsSources"`
   320  	// The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
   321  	Content string `pulumi:"content"`
   322  	// The format of the document. Valid values: `JSON`, `TEXT`, `YAML`.
   323  	DocumentFormat *string `pulumi:"documentFormat"`
   324  	// The type of the document. For a list of valid values, see the [API Reference](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#systemsmanager-CreateDocument-request-DocumentType).
   325  	DocumentType string `pulumi:"documentType"`
   326  	// The name of the document.
   327  	Name *string `pulumi:"name"`
   328  	// Additional permissions to attach to the document. See Permissions below for details.
   329  	Permissions map[string]string `pulumi:"permissions"`
   330  	// A map of tags to assign to the object. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   331  	Tags map[string]string `pulumi:"tags"`
   332  	// The target type which defines the kinds of resources the document can run on. For example, `/AWS::EC2::Instance`. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
   333  	TargetType *string `pulumi:"targetType"`
   334  	// The version of the artifact associated with the document. For example, `12.6`. This value is unique across all versions of a document, and can't be changed.
   335  	VersionName *string `pulumi:"versionName"`
   336  }
   337  
   338  // The set of arguments for constructing a Document resource.
   339  type DocumentArgs struct {
   340  	// One or more configuration blocks describing attachments sources to a version of a document. See `attachmentsSource` block below for details.
   341  	AttachmentsSources DocumentAttachmentsSourceArrayInput
   342  	// The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
   343  	Content pulumi.StringInput
   344  	// The format of the document. Valid values: `JSON`, `TEXT`, `YAML`.
   345  	DocumentFormat pulumi.StringPtrInput
   346  	// The type of the document. For a list of valid values, see the [API Reference](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#systemsmanager-CreateDocument-request-DocumentType).
   347  	DocumentType pulumi.StringInput
   348  	// The name of the document.
   349  	Name pulumi.StringPtrInput
   350  	// Additional permissions to attach to the document. See Permissions below for details.
   351  	Permissions pulumi.StringMapInput
   352  	// A map of tags to assign to the object. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   353  	Tags pulumi.StringMapInput
   354  	// The target type which defines the kinds of resources the document can run on. For example, `/AWS::EC2::Instance`. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
   355  	TargetType pulumi.StringPtrInput
   356  	// The version of the artifact associated with the document. For example, `12.6`. This value is unique across all versions of a document, and can't be changed.
   357  	VersionName pulumi.StringPtrInput
   358  }
   359  
   360  func (DocumentArgs) ElementType() reflect.Type {
   361  	return reflect.TypeOf((*documentArgs)(nil)).Elem()
   362  }
   363  
   364  type DocumentInput interface {
   365  	pulumi.Input
   366  
   367  	ToDocumentOutput() DocumentOutput
   368  	ToDocumentOutputWithContext(ctx context.Context) DocumentOutput
   369  }
   370  
   371  func (*Document) ElementType() reflect.Type {
   372  	return reflect.TypeOf((**Document)(nil)).Elem()
   373  }
   374  
   375  func (i *Document) ToDocumentOutput() DocumentOutput {
   376  	return i.ToDocumentOutputWithContext(context.Background())
   377  }
   378  
   379  func (i *Document) ToDocumentOutputWithContext(ctx context.Context) DocumentOutput {
   380  	return pulumi.ToOutputWithContext(ctx, i).(DocumentOutput)
   381  }
   382  
   383  // DocumentArrayInput is an input type that accepts DocumentArray and DocumentArrayOutput values.
   384  // You can construct a concrete instance of `DocumentArrayInput` via:
   385  //
   386  //	DocumentArray{ DocumentArgs{...} }
   387  type DocumentArrayInput interface {
   388  	pulumi.Input
   389  
   390  	ToDocumentArrayOutput() DocumentArrayOutput
   391  	ToDocumentArrayOutputWithContext(context.Context) DocumentArrayOutput
   392  }
   393  
   394  type DocumentArray []DocumentInput
   395  
   396  func (DocumentArray) ElementType() reflect.Type {
   397  	return reflect.TypeOf((*[]*Document)(nil)).Elem()
   398  }
   399  
   400  func (i DocumentArray) ToDocumentArrayOutput() DocumentArrayOutput {
   401  	return i.ToDocumentArrayOutputWithContext(context.Background())
   402  }
   403  
   404  func (i DocumentArray) ToDocumentArrayOutputWithContext(ctx context.Context) DocumentArrayOutput {
   405  	return pulumi.ToOutputWithContext(ctx, i).(DocumentArrayOutput)
   406  }
   407  
   408  // DocumentMapInput is an input type that accepts DocumentMap and DocumentMapOutput values.
   409  // You can construct a concrete instance of `DocumentMapInput` via:
   410  //
   411  //	DocumentMap{ "key": DocumentArgs{...} }
   412  type DocumentMapInput interface {
   413  	pulumi.Input
   414  
   415  	ToDocumentMapOutput() DocumentMapOutput
   416  	ToDocumentMapOutputWithContext(context.Context) DocumentMapOutput
   417  }
   418  
   419  type DocumentMap map[string]DocumentInput
   420  
   421  func (DocumentMap) ElementType() reflect.Type {
   422  	return reflect.TypeOf((*map[string]*Document)(nil)).Elem()
   423  }
   424  
   425  func (i DocumentMap) ToDocumentMapOutput() DocumentMapOutput {
   426  	return i.ToDocumentMapOutputWithContext(context.Background())
   427  }
   428  
   429  func (i DocumentMap) ToDocumentMapOutputWithContext(ctx context.Context) DocumentMapOutput {
   430  	return pulumi.ToOutputWithContext(ctx, i).(DocumentMapOutput)
   431  }
   432  
   433  type DocumentOutput struct{ *pulumi.OutputState }
   434  
   435  func (DocumentOutput) ElementType() reflect.Type {
   436  	return reflect.TypeOf((**Document)(nil)).Elem()
   437  }
   438  
   439  func (o DocumentOutput) ToDocumentOutput() DocumentOutput {
   440  	return o
   441  }
   442  
   443  func (o DocumentOutput) ToDocumentOutputWithContext(ctx context.Context) DocumentOutput {
   444  	return o
   445  }
   446  
   447  // The Amazon Resource Name (ARN) of the document.
   448  func (o DocumentOutput) Arn() pulumi.StringOutput {
   449  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   450  }
   451  
   452  // One or more configuration blocks describing attachments sources to a version of a document. See `attachmentsSource` block below for details.
   453  func (o DocumentOutput) AttachmentsSources() DocumentAttachmentsSourceArrayOutput {
   454  	return o.ApplyT(func(v *Document) DocumentAttachmentsSourceArrayOutput { return v.AttachmentsSources }).(DocumentAttachmentsSourceArrayOutput)
   455  }
   456  
   457  // The content for the SSM document in JSON or YAML format. The content of the document must not exceed 64KB. This quota also includes the content specified for input parameters at runtime. We recommend storing the contents for your new document in an external JSON or YAML file and referencing the file in a command.
   458  func (o DocumentOutput) Content() pulumi.StringOutput {
   459  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.Content }).(pulumi.StringOutput)
   460  }
   461  
   462  // The date the document was created.
   463  func (o DocumentOutput) CreatedDate() pulumi.StringOutput {
   464  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.CreatedDate }).(pulumi.StringOutput)
   465  }
   466  
   467  // The default version of the document.
   468  func (o DocumentOutput) DefaultVersion() pulumi.StringOutput {
   469  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.DefaultVersion }).(pulumi.StringOutput)
   470  }
   471  
   472  // A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
   473  func (o DocumentOutput) Description() pulumi.StringOutput {
   474  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
   475  }
   476  
   477  // The format of the document. Valid values: `JSON`, `TEXT`, `YAML`.
   478  func (o DocumentOutput) DocumentFormat() pulumi.StringPtrOutput {
   479  	return o.ApplyT(func(v *Document) pulumi.StringPtrOutput { return v.DocumentFormat }).(pulumi.StringPtrOutput)
   480  }
   481  
   482  // The type of the document. For a list of valid values, see the [API Reference](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#systemsmanager-CreateDocument-request-DocumentType).
   483  func (o DocumentOutput) DocumentType() pulumi.StringOutput {
   484  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.DocumentType }).(pulumi.StringOutput)
   485  }
   486  
   487  // The document version.
   488  func (o DocumentOutput) DocumentVersion() pulumi.StringOutput {
   489  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.DocumentVersion }).(pulumi.StringOutput)
   490  }
   491  
   492  // The Sha256 or Sha1 hash created by the system when the document was created.
   493  func (o DocumentOutput) Hash() pulumi.StringOutput {
   494  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.Hash }).(pulumi.StringOutput)
   495  }
   496  
   497  // The hash type of the document. Valid values: `Sha256`, `Sha1`.
   498  func (o DocumentOutput) HashType() pulumi.StringOutput {
   499  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.HashType }).(pulumi.StringOutput)
   500  }
   501  
   502  // The latest version of the document.
   503  func (o DocumentOutput) LatestVersion() pulumi.StringOutput {
   504  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.LatestVersion }).(pulumi.StringOutput)
   505  }
   506  
   507  // The name of the document.
   508  func (o DocumentOutput) Name() pulumi.StringOutput {
   509  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   510  }
   511  
   512  // The Amazon Web Services user that created the document.
   513  func (o DocumentOutput) Owner() pulumi.StringOutput {
   514  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.Owner }).(pulumi.StringOutput)
   515  }
   516  
   517  // One or more configuration blocks describing the parameters for the document. See `parameter` block below for details.
   518  func (o DocumentOutput) Parameters() DocumentParameterArrayOutput {
   519  	return o.ApplyT(func(v *Document) DocumentParameterArrayOutput { return v.Parameters }).(DocumentParameterArrayOutput)
   520  }
   521  
   522  // Additional permissions to attach to the document. See Permissions below for details.
   523  func (o DocumentOutput) Permissions() pulumi.StringMapOutput {
   524  	return o.ApplyT(func(v *Document) pulumi.StringMapOutput { return v.Permissions }).(pulumi.StringMapOutput)
   525  }
   526  
   527  // The list of operating system (OS) platforms compatible with this SSM document. Valid values: `Windows`, `Linux`, `MacOS`.
   528  func (o DocumentOutput) PlatformTypes() pulumi.StringArrayOutput {
   529  	return o.ApplyT(func(v *Document) pulumi.StringArrayOutput { return v.PlatformTypes }).(pulumi.StringArrayOutput)
   530  }
   531  
   532  // The schema version of the document.
   533  func (o DocumentOutput) SchemaVersion() pulumi.StringOutput {
   534  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.SchemaVersion }).(pulumi.StringOutput)
   535  }
   536  
   537  // The status of the SSM document. Valid values: `Creating`, `Active`, `Updating`, `Deleting`, `Failed`.
   538  func (o DocumentOutput) Status() pulumi.StringOutput {
   539  	return o.ApplyT(func(v *Document) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   540  }
   541  
   542  // A map of tags to assign to the object. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   543  func (o DocumentOutput) Tags() pulumi.StringMapOutput {
   544  	return o.ApplyT(func(v *Document) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   545  }
   546  
   547  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   548  //
   549  // Deprecated: Please use `tags` instead.
   550  func (o DocumentOutput) TagsAll() pulumi.StringMapOutput {
   551  	return o.ApplyT(func(v *Document) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   552  }
   553  
   554  // The target type which defines the kinds of resources the document can run on. For example, `/AWS::EC2::Instance`. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
   555  func (o DocumentOutput) TargetType() pulumi.StringPtrOutput {
   556  	return o.ApplyT(func(v *Document) pulumi.StringPtrOutput { return v.TargetType }).(pulumi.StringPtrOutput)
   557  }
   558  
   559  // The version of the artifact associated with the document. For example, `12.6`. This value is unique across all versions of a document, and can't be changed.
   560  func (o DocumentOutput) VersionName() pulumi.StringPtrOutput {
   561  	return o.ApplyT(func(v *Document) pulumi.StringPtrOutput { return v.VersionName }).(pulumi.StringPtrOutput)
   562  }
   563  
   564  type DocumentArrayOutput struct{ *pulumi.OutputState }
   565  
   566  func (DocumentArrayOutput) ElementType() reflect.Type {
   567  	return reflect.TypeOf((*[]*Document)(nil)).Elem()
   568  }
   569  
   570  func (o DocumentArrayOutput) ToDocumentArrayOutput() DocumentArrayOutput {
   571  	return o
   572  }
   573  
   574  func (o DocumentArrayOutput) ToDocumentArrayOutputWithContext(ctx context.Context) DocumentArrayOutput {
   575  	return o
   576  }
   577  
   578  func (o DocumentArrayOutput) Index(i pulumi.IntInput) DocumentOutput {
   579  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Document {
   580  		return vs[0].([]*Document)[vs[1].(int)]
   581  	}).(DocumentOutput)
   582  }
   583  
   584  type DocumentMapOutput struct{ *pulumi.OutputState }
   585  
   586  func (DocumentMapOutput) ElementType() reflect.Type {
   587  	return reflect.TypeOf((*map[string]*Document)(nil)).Elem()
   588  }
   589  
   590  func (o DocumentMapOutput) ToDocumentMapOutput() DocumentMapOutput {
   591  	return o
   592  }
   593  
   594  func (o DocumentMapOutput) ToDocumentMapOutputWithContext(ctx context.Context) DocumentMapOutput {
   595  	return o
   596  }
   597  
   598  func (o DocumentMapOutput) MapIndex(k pulumi.StringInput) DocumentOutput {
   599  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Document {
   600  		return vs[0].(map[string]*Document)[vs[1].(string)]
   601  	}).(DocumentOutput)
   602  }
   603  
   604  func init() {
   605  	pulumi.RegisterInputType(reflect.TypeOf((*DocumentInput)(nil)).Elem(), &Document{})
   606  	pulumi.RegisterInputType(reflect.TypeOf((*DocumentArrayInput)(nil)).Elem(), DocumentArray{})
   607  	pulumi.RegisterInputType(reflect.TypeOf((*DocumentMapInput)(nil)).Elem(), DocumentMap{})
   608  	pulumi.RegisterOutputType(DocumentOutput{})
   609  	pulumi.RegisterOutputType(DocumentArrayOutput{})
   610  	pulumi.RegisterOutputType(DocumentMapOutput{})
   611  }