/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.simplesystemsmanagement.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDocumentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The content for the new 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. *
** For examples, see the following topics in the Amazon Web Services Systems Manager User Guide. *
*
* A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user
* creates an AppConfig configuration in an SSM document, the user must also specify a required document for
* validation purposes. In this case, an ApplicationConfiguration
document requires an
* ApplicationConfigurationSchema
document for validation purposes. For more information, see What is AppConfig? in
* the AppConfig User Guide.
*
* A list of key-value pairs that describe attachments to a version of a document. *
*/ private com.amazonaws.internal.SdkInternalList* A name for the SSM document. *
** You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use * as document name prefixes: *
*
* aws
*
* amazon
*
* amzn
*
* An optional field where you can specify a friendly name for the SSM document. This value can differ for each * version of the document. You can update this value at a later time using the UpdateDocument operation. *
*/ private String displayName; /** *
* An optional field specifying the version of the artifact you are creating with the document. For example,
* Release12.1
. This value is unique across all versions of a document, and can't be changed.
*
* The type of document to create. *
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for AppConfig.
*
* Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default * format. *
*/ private String documentFormat; /** *
* Specify a target type to define the kinds of resources the document can run on. For example, to run a document on
* EC2 instances, specify the following value: /AWS::EC2::Instance
. If you specify a value of '/' the
* document can run on all types of resources. If you don't specify a value, the document can't run on any
* resources. For a list of valid resource types, see Amazon
* Web Services resource and property types reference in the CloudFormation User Guide.
*
* Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such * as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of * targets or the environment where it will run. In this case, you could specify the following key-value pairs: *
*
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
** The content for the new 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. *
** For examples, see the following topics in the Amazon Web Services Systems Manager User Guide. *
** For examples, see the following topics in the Amazon Web Services Systems Manager User Guide. *
** The content for the new 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. *
** For examples, see the following topics in the Amazon Web Services Systems Manager User Guide. *
** For examples, see the following topics in the Amazon Web Services Systems Manager User Guide. *
** The content for the new 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. *
** For examples, see the following topics in the Amazon Web Services Systems Manager User Guide. *
** For examples, see the following topics in the Amazon Web Services Systems Manager User Guide. *
*
* A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user
* creates an AppConfig configuration in an SSM document, the user must also specify a required document for
* validation purposes. In this case, an ApplicationConfiguration
document requires an
* ApplicationConfigurationSchema
document for validation purposes. For more information, see What is AppConfig? in
* the AppConfig User Guide.
*
ApplicationConfiguration
document
* requires an ApplicationConfigurationSchema
document for validation purposes. For more
* information, see What is
* AppConfig? in the AppConfig User Guide.
*/
public java.util.List
* A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user
* creates an AppConfig configuration in an SSM document, the user must also specify a required document for
* validation purposes. In this case, an ApplicationConfiguration
document requires an
* ApplicationConfigurationSchema
document for validation purposes. For more information, see What is AppConfig? in
* the AppConfig User Guide.
*
ApplicationConfiguration
document requires an
* ApplicationConfigurationSchema
document for validation purposes. For more information, see What is
* AppConfig? in the AppConfig User Guide.
*/
public void setRequires(java.util.Collection
* A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user
* creates an AppConfig configuration in an SSM document, the user must also specify a required document for
* validation purposes. In this case, an ApplicationConfiguration
document requires an
* ApplicationConfigurationSchema
document for validation purposes. For more information, see What is AppConfig? in
* the AppConfig User Guide.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRequires(java.util.Collection)} or {@link #withRequires(java.util.Collection)} if you want to override * the existing values. *
* * @param requires * A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a * user creates an AppConfig configuration in an SSM document, the user must also specify a required document * for validation purposes. In this case, anApplicationConfiguration
document requires an
* ApplicationConfigurationSchema
document for validation purposes. For more information, see What is
* AppConfig? in the AppConfig User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDocumentRequest withRequires(DocumentRequires... requires) {
if (this.requires == null) {
setRequires(new com.amazonaws.internal.SdkInternalList
* A list of SSM documents required by a document. This parameter is used exclusively by AppConfig. When a user
* creates an AppConfig configuration in an SSM document, the user must also specify a required document for
* validation purposes. In this case, an ApplicationConfiguration
document requires an
* ApplicationConfigurationSchema
document for validation purposes. For more information, see What is AppConfig? in
* the AppConfig User Guide.
*
ApplicationConfiguration
document requires an
* ApplicationConfigurationSchema
document for validation purposes. For more information, see What is
* AppConfig? in the AppConfig User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDocumentRequest withRequires(java.util.Collection* A list of key-value pairs that describe attachments to a version of a document. *
* * @return A list of key-value pairs that describe attachments to a version of a document. */ public java.util.List* A list of key-value pairs that describe attachments to a version of a document. *
* * @param attachments * A list of key-value pairs that describe attachments to a version of a document. */ public void setAttachments(java.util.Collection* A list of key-value pairs that describe attachments to a version of a document. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAttachments(java.util.Collection)} or {@link #withAttachments(java.util.Collection)} if you want to * override the existing values. *
* * @param attachments * A list of key-value pairs that describe attachments to a version of a document. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDocumentRequest withAttachments(AttachmentsSource... attachments) { if (this.attachments == null) { setAttachments(new com.amazonaws.internal.SdkInternalList* A list of key-value pairs that describe attachments to a version of a document. *
* * @param attachments * A list of key-value pairs that describe attachments to a version of a document. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDocumentRequest withAttachments(java.util.Collection* A name for the SSM document. *
** You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use * as document name prefixes: *
*
* aws
*
* amazon
*
* amzn
*
* You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services * for use as document name prefixes: *
*
* aws
*
* amazon
*
* amzn
*
* A name for the SSM document. *
** You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use * as document name prefixes: *
*
* aws
*
* amazon
*
* amzn
*
* You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services * for use as document name prefixes: *
*
* aws
*
* amazon
*
* amzn
*
* A name for the SSM document. *
** You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services for use * as document name prefixes: *
*
* aws
*
* amazon
*
* amzn
*
* You can't use the following strings as document name prefixes. These are reserved by Amazon Web Services * for use as document name prefixes: *
*
* aws
*
* amazon
*
* amzn
*
* An optional field where you can specify a friendly name for the SSM document. This value can differ for each * version of the document. You can update this value at a later time using the UpdateDocument operation. *
* * @param displayName * An optional field where you can specify a friendly name for the SSM document. This value can differ for * each version of the document. You can update this value at a later time using the UpdateDocument * operation. */ public void setDisplayName(String displayName) { this.displayName = displayName; } /** ** An optional field where you can specify a friendly name for the SSM document. This value can differ for each * version of the document. You can update this value at a later time using the UpdateDocument operation. *
* * @return An optional field where you can specify a friendly name for the SSM document. This value can differ for * each version of the document. You can update this value at a later time using the UpdateDocument * operation. */ public String getDisplayName() { return this.displayName; } /** ** An optional field where you can specify a friendly name for the SSM document. This value can differ for each * version of the document. You can update this value at a later time using the UpdateDocument operation. *
* * @param displayName * An optional field where you can specify a friendly name for the SSM document. This value can differ for * each version of the document. You can update this value at a later time using the UpdateDocument * operation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDocumentRequest withDisplayName(String displayName) { setDisplayName(displayName); return this; } /** *
* An optional field specifying the version of the artifact you are creating with the document. For example,
* Release12.1
. This value is unique across all versions of a document, and can't be changed.
*
Release12.1
. This value is unique across all versions of a document, and can't be changed.
*/
public void setVersionName(String versionName) {
this.versionName = versionName;
}
/**
*
* An optional field specifying the version of the artifact you are creating with the document. For example,
* Release12.1
. This value is unique across all versions of a document, and can't be changed.
*
Release12.1
. This value is unique across all versions of a document, and can't be changed.
*/
public String getVersionName() {
return this.versionName;
}
/**
*
* An optional field specifying the version of the artifact you are creating with the document. For example,
* Release12.1
. This value is unique across all versions of a document, and can't be changed.
*
Release12.1
. This value is unique across all versions of a document, and can't be changed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDocumentRequest withVersionName(String versionName) {
setVersionName(versionName);
return this;
}
/**
* * The type of document to create. *
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for AppConfig.
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for
* AppConfig.
*
* The type of document to create. *
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for AppConfig.
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for
* AppConfig.
*
* The type of document to create. *
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for AppConfig.
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for
* AppConfig.
*
* The type of document to create. *
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for AppConfig.
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for
* AppConfig.
*
* The type of document to create. *
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for AppConfig.
*
* The DeploymentStrategy
document type is an internal-use-only document type reserved for
* AppConfig.
*
* Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default * format. *
* * @param documentFormat * Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the * default format. * @see DocumentFormat */ public void setDocumentFormat(String documentFormat) { this.documentFormat = documentFormat; } /** ** Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default * format. *
* * @return Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the * default format. * @see DocumentFormat */ public String getDocumentFormat() { return this.documentFormat; } /** ** Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default * format. *
* * @param documentFormat * Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the * default format. * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentFormat */ public CreateDocumentRequest withDocumentFormat(String documentFormat) { setDocumentFormat(documentFormat); return this; } /** ** Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default * format. *
* * @param documentFormat * Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the * default format. * @see DocumentFormat */ public void setDocumentFormat(DocumentFormat documentFormat) { withDocumentFormat(documentFormat); } /** ** Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the default * format. *
* * @param documentFormat * Specify the document format for the request. The document format can be JSON, YAML, or TEXT. JSON is the * default format. * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentFormat */ public CreateDocumentRequest withDocumentFormat(DocumentFormat documentFormat) { this.documentFormat = documentFormat.toString(); return this; } /** *
* Specify a target type to define the kinds of resources the document can run on. For example, to run a document on
* EC2 instances, specify the following value: /AWS::EC2::Instance
. If you specify a value of '/' the
* document can run on all types of resources. If you don't specify a value, the document can't run on any
* resources. For a list of valid resource types, see Amazon
* Web Services resource and property types reference in the CloudFormation User Guide.
*
/AWS::EC2::Instance
. If you specify a
* value of '/' the document can run on all types of resources. If you don't specify a value, the document
* can't run on any resources. For a list of valid resource types, see Amazon Web Services resource and property types reference in the CloudFormation User Guide.
*/
public void setTargetType(String targetType) {
this.targetType = targetType;
}
/**
*
* Specify a target type to define the kinds of resources the document can run on. For example, to run a document on
* EC2 instances, specify the following value: /AWS::EC2::Instance
. If you specify a value of '/' the
* document can run on all types of resources. If you don't specify a value, the document can't run on any
* resources. For a list of valid resource types, see Amazon
* Web Services resource and property types reference in the CloudFormation User Guide.
*
/AWS::EC2::Instance
. If you specify
* a value of '/' the document can run on all types of resources. If you don't specify a value, the document
* can't run on any resources. For a list of valid resource types, see Amazon Web Services resource and property types reference in the CloudFormation User Guide.
*/
public String getTargetType() {
return this.targetType;
}
/**
*
* Specify a target type to define the kinds of resources the document can run on. For example, to run a document on
* EC2 instances, specify the following value: /AWS::EC2::Instance
. If you specify a value of '/' the
* document can run on all types of resources. If you don't specify a value, the document can't run on any
* resources. For a list of valid resource types, see Amazon
* Web Services resource and property types reference in the CloudFormation User Guide.
*
/AWS::EC2::Instance
. If you specify a
* value of '/' the document can run on all types of resources. If you don't specify a value, the document
* can't run on any resources. For a list of valid resource types, see Amazon Web Services resource and property types reference in the CloudFormation User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDocumentRequest withTargetType(String targetType) {
setTargetType(targetType);
return this;
}
/**
* * Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such * as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of * targets or the environment where it will run. In this case, you could specify the following key-value pairs: *
*
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
*
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
*/ public java.util.List* Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such * as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of * targets or the environment where it will run. In this case, you could specify the following key-value pairs: *
*
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
*
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
*/ public void setTags(java.util.Collection* Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such * as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of * targets or the environment where it will run. In this case, you could specify the following key-value pairs: *
*
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different * ways, such as by purpose, owner, or environment. For example, you might want to tag an SSM document to * identify the types of targets or the environment where it will run. In this case, you could specify the * following key-value pairs: *
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateDocumentRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such * as by purpose, owner, or environment. For example, you might want to tag an SSM document to identify the types of * targets or the environment where it will run. In this case, you could specify the following key-value pairs: *
*
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
*
* Key=OS,Value=Windows
*
* Key=Environment,Value=Production
*
* To add tags to an existing SSM document, use the AddTagsToResource operation. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateDocumentRequest withTags(java.util.Collection