aws-ssm-document-language-service
Version:
A language server for AWS Systems Manager documents
1 lines • 56.7 kB
JSON
{"$schema":"http://json-schema.org/draft-07/schema","title":"JSON schema for AWS Automation Documents","type":"object","required":["schemaVersion","mainSteps"],"properties":{"schemaVersion":{"type":"string","description":"The schema version to use.","enum":["0.3"]},"description":{"type":"string","description":"Information you provide to describe the purpose of the document."},"assumeRole":{"type":"string","description":"The ARN of the role that allows Automation to perform the actions on your behalf."},"parameters":{"type":"object","description":"A structure that defines the parameters the document accepts. For parameters that you reference often, we recommend that you store those parameters in Systems Manager Parameter Store and then reference them. You can reference String and StringList Parameter Store parameters in this section of a document. You can't reference SecureString Parameter Store parameters in this section of a document. For more information, see AWS Systems Manager Parameter Store.","patternProperties":{"^.*$":{"type":"object","description":"Parameter definition.","required":["type"],"properties":{"description":{"type":"string","description":"(Optional) A description of the parameter."},"type":{"type":"string","description":"(Required) Allowed values include the following: String, StringList, Boolean, Integer, MapList, and StringMap.","enum":["String","StringList","Boolean","Integer","MapList","StringMap"]},"default":{"description":"(Optional) The default value of the parameter or a reference to a parameter in Parameter Store."},"allowedValues":{"type":"array","description":"(Optional) An array of values allowed for the parameter. Defining allowed values for the parameter validates the user input. If a user inputs a value that is not allowed, the execution fails to start."},"allowedPattern":{"type":"string","description":"(Optional) A regular expression that validates whether the user input matches the defined pattern for the parameter. If the user input does not match the allowed pattern, the execution fails to start."},"displayType":{"type":"string","description":"(Optional) Used to display either a textfield or a textarea in the AWS Management Console. textfield is a single-line text box. textarea is a multi-line text area.","enum":["textfield","textarea"]},"minItems":{"type":"number","description":"(Optional) The minimum number of items allowed."},"maxItems":{"type":"number","description":"(Optional) The maximum number of items allowed."},"minChars":{"type":"number","description":"(Optional) The minimum number of parameter characters allowed."},"maxChars":{"type":"number","description":"(Optional) The maximum number of parameter characters allowed."}},"additionalProperties":false,"allOf":[{"if":{"properties":{"type":{"const":"String"}}},"then":{"properties":{"default":{"type":"string"},"allowedValues":{"items":{"type":"string"}}}}},{"if":{"properties":{"type":{"const":"Boolean"}}},"then":{"properties":{"default":{"type":"boolean"},"allowedValues":{"items":{"type":"boolean"}}}}},{"if":{"properties":{"type":{"const":"Integer"}}},"then":{"properties":{"default":{"type":"number"},"allowedValues":{"items":{"type":"number"}}}}},{"if":{"properties":{"type":{"const":"StringList"}}},"then":{"properties":{"default":{"items":{"type":"string"}},"allowedValues":{"items":{"type":["string","array"]}}}}},{"if":{"properties":{"type":{"const":"StringMap"}}},"then":{"properties":{"default":{"items":{"type":"object"}},"allowedValues":{"items":{"type":"object"}}}}},{"if":{"properties":{"type":{"const":"MapList"}}},"then":{"properties":{"default":{"items":{"type":"array","items":{"type":"object"}}},"allowedValues":{"items":{"type":["object","array"]}}}}}]}},"additionalProperties":false},"mainSteps":{"type":"array","description":"An array that can include multiple steps. Steps run in sequential order as listed in the document.","items":{"type":"object","required":["name","action","inputs"],"additionalProperties":false,"properties":{"name":{"description":"An identifier that must be unique across all step names in the document.","type":"string"},"action":{"description":"Select the Automation action type to run in this step.","type":"string","enum":["aws:approve","aws:assertAwsResourceProperty","aws:branch","aws:changeInstanceState","aws:copyImage","aws:createImage","aws:createStack","aws:createTags","aws:deleteImage","aws:deleteStack","aws:executeAutomation","aws:executeAwsApi","aws:executeScript","aws:executeStateMachine","aws:invokeLambdaFunction","aws:pause","aws:runCommand","aws:runInstances","aws:sleep","aws:waitForAwsResourceProperty"]},"description":{"description":"Enter information to describe the purpose or usage of this step.","type":"string"},"maxAttempts":{"description":"The number of times the step should be retried in case of failure. If the value is greater than 1, the step is not considered to have failed until all retry attempts have failed. The default value is 1.","type":"integer","default":1},"timeoutSeconds":{"type":["integer","string"],"description":"The execution timeout value for the step. If the timeout is reached and the value of maxAttempts is greater than 1, then the step is not considered to have timed out until all retries have been attempted."},"onFailure":{"description":"Indicates whether the workflow should abort, continue, or go to a different step on failure. The default value for this option is abort.","type":"string","pattern":"((^|, )(Abort|Continue|step:\\w+))$","default":"Abort"},"nextStep":{"description":"Specifies which step in an Automation workflow to process next after successfully completing a step.","type":"string"},"isEnd":{"description":"This option stops an Automation execution at the end of a specific step. The Automation execution stops if the step execution failed or succeeded. The default value is false.","type":["string","boolean"],"default":false},"isCritical":{"description":"Designates a step as critical for the successful completion of the Automation. If a step with this designation fails, then Automation reports the final status of the Automation as Failed. This property is only evaluated if you explicitly define it in your step. The default value for this option is true.","type":["string","boolean"],"default":true},"inputs":{"description":"The properties specific to the action.","type":"object"},"outputs":{"description":"Define new outputs for a step that can be referenced from other steps.","type":"array","items":{"type":"object","properties":{"Name":{"description":"Output variable name.","type":"string"},"Selector":{"description":"JSONPath to select the value from the action output.","type":"string"},"Type":{"description":"Output variable type.","type":"string","enum":["String","StringList","Boolean","Integer","MapList","StringMap"]}}}}},"allOf":[{"if":{"properties":{"action":{"const":"aws:approve"}}},"then":{"properties":{"inputs":{"properties":{"NotificationArn":{"description":"The ARN of an Amazon SNS topic for Automation approvals. When you specify an aws:approve step in an Automation document, Automation sends a message to this topic letting principals know that they must either approve or reject an Automation step. The title of the Amazon SNS topic must be prefixed with \"Automation\".","type":"string"},"Message":{"description":"The information you want to include in the SNS topic when the approval request is sent. The maximum message length is 4096 characters.","type":"string"},"MinRequiredApprovals":{"description":"The minimum number of approvals required to resume the Automation execution. If you don't specify a value, the system defaults to one. The value for this parameter must be a positive number. The value for this parameter can't exceed the number of approvers defined by the Approvers parameter.","type":["string","integer"]},"Approvers":{"description":"A list of AWS authenticated principals who are able to either approve or reject the action. The maximum number of approvers is 10. You can specify principals by using any of the following formats:\n\nAn AWS Identity and Access Management (IAM) user name\n\nAn IAM user ARN\n\nAn IAM role ARN\n\nAn IAM assume role user ARN","type":["string","array"],"items":{"type":"string"}}},"required":["Approvers"]}},"required":["inputs"]}},{"if":{"properties":{"action":{"const":"aws:assertAwsResourceProperty"}}},"then":{"description":"The aws:assertAwsResourceProperty action enables you to assert a specific resource state or event state for a specific Automation step.","properties":{"inputs":{"properties":{"Service":{"description":"The AWS service namespace that contains the API action that you want to run. For example, the namespace for Systems Manager is ssm. The namespace for Amazon EC2 is ec2. You can view a list of supported AWS service namespaces in the Available Services section of the AWS CLI Command Reference.","type":"string"},"Api":{"description":"The name of the API action that you want to run. You can view the API actions (also called methods) by choosing a service in the left navigation on the following Services Reference page. Choose a method in the Client section for the service that you want to invoke. For example, all API actions (methods) for Amazon Relational Database Service (Amazon RDS) are listed on the following page: Amazon RDS methods.","type":"string"},"PropertySelector":{"description":"The JSONPath to a specific attribute in the response object. You can view the response objects by choosing a service in the left navigation on the following Services Reference page. Choose a method in the Client section for the service that you want to invoke."},"DesiredValues":{"description":"The expected status or state on which to continue the Automation workflow. If you specify a Boolean value, you must use a capital letter such as True or False."}},"additionalProperties":{"description":"One or more API action inputs. You can view the available inputs (also called parameters) by choosing a service in the left navigation on the following Services Reference page. Choose a method in the Client section for the service that you want to invoke."},"required":["Service","Api","PropertySelector","DesiredValues"]}}}},{"if":{"properties":{"action":{"const":"aws:branch"}}},"then":{"description":"The aws:branch action enables you to create a dynamic Automation workflow that evaluates different choices in a single step and then jumps to a different step in the Automation document based on the results of that evaluation. \n\nWhen you specify the aws:branch action for a step, you specify Choices that the workflow must evaluate. The Choices can be based on either a value that you specified in the Parameters section of the Automation document, or a dynamic value generated as the output from the previous step. The Automation workflow evaluates each choice by using a Boolean expression. If the first choice is true, then the workflow jumps to the step designated for that choice. If the first choice is false, the workflow evaluates the next choice. The workflow continues evaluating each choice until it process a true choice. The workflow then jumps to the designated step for the true choice. \n\nIf none of the choices are true, the workflow checks to see if the step contains a default value. A default value defines a step that the workflow should jump to if none of the choices are true. If no default value is specified for the step, then the Automation workflow processes the next step in the document.\n\nThe aws:branch action supports complex choice evaluations by using a combination of And, Not, and Or operators.","properties":{"inputs":{"properties":{"Choices":{"description":"One or more expressions that the Automation should evaluate when determining the next step to process. Choices are evaluated by using a Boolean expression.","type":"array","items":[{"type":"object","properties":{"branchConditional":{"type":"object","oneOf":[{"properties":{"Variable":{"description":"Specify either the name of a parameter that is defined in the Parameters section of the Automation document. Or specify an output object from a previous step in the Automation document.","type":"string"},"simpleCondition":{"description":"Criteria used to evaluate choice","type":"object","oneOf":[{"properties":{"StringEquals":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"EqualsIgnoreCase":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"StartsWith":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"EndsWith":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"Contains":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"NumericEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericGreater":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericLesser":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericGreaterOrEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericLesserOrEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"BooleanEquals":{"description":"Criteria used to evaluate choice","type":"boolean"}}}]}}},{"type":"object","oneOf":[{"type":"object","properties":{"And":{"description":"Use the And operator when you want multiple variables to be true for a choice","properties":{"items":{"type":"object","properties":{"simpleConditional":{"properties":{"Variable":{"description":"Specify either the name of a parameter that is defined in the Parameters section of the Automation document. Or specify an output object from a previous step in the Automation document.","type":"string"},"simpleCondition":{"description":"Criteria used to evaluate choice","type":"object","oneOf":[{"properties":{"StringEquals":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"EqualsIgnoreCase":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"StartsWith":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"EndsWith":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"Contains":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"NumericEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericGreater":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericLesser":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericGreaterOrEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericLesserOrEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"BooleanEquals":{"description":"Criteria used to evaluate choice","type":"boolean"}}}]}}}}}}}}},{"type":"object","properties":{"Or":{"description":"Use the Or operator when you want any of multiple variables to be true for a choice.","properties":{"items":{"type":"object","properties":{"simpleConditional":{"properties":{"Variable":{"description":"Specify either the name of a parameter that is defined in the Parameters section of the Automation document. Or specify an output object from a previous step in the Automation document.","type":"string"},"simpleCondition":{"description":"Criteria used to evaluate choice","type":"object","oneOf":[{"properties":{"StringEquals":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"EqualsIgnoreCase":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"StartsWith":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"EndsWith":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"Contains":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"NumericEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericGreater":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericLesser":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericGreaterOrEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericLesserOrEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"BooleanEquals":{"description":"Criteria used to evaluate choice","type":"boolean"}}}]}}}}}}}}},{"type":"object","properties":{"Not":{"description":"Use the Not operator when you want to jump to a step defined when a variable is not true","properties":{"simpleConditional":{"properties":{"Variable":{"description":"Specify either the name of a parameter that is defined in the Parameters section of the Automation document. Or specify an output object from a previous step in the Automation document.","type":"string"},"simpleCondition":{"description":"Criteria used to evaluate choice","type":"object","oneOf":[{"properties":{"StringEquals":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"EqualsIgnoreCase":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"StartsWith":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"EndsWith":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"Contains":{"description":"Criteria used to evaluate choice","type":"string"}}},{"properties":{"NumericEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericGreater":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericLesser":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericGreaterOrEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"NumericLesserOrEquals":{"description":"Criteria used to evaluate choice","type":"number"}}},{"properties":{"BooleanEquals":{"description":"Criteria used to evaluate choice","type":"boolean"}}}]}}}}}}}]}]},"NextStep":{"description":"The next step in the Automation document to process if the designated choice is true.","type":"string"}}}]},"Default":{"description":"The name of a step the workflow should jump to if none of the Choices are true.","type":"string"}}}}}},{"if":{"properties":{"action":{"const":"aws:changeInstanceState"}}},"then":{"description":"Changes or asserts the state of the instance.\n\nThis action can be used in assert mode (do not run the API to change the state but verify the instance is in the desired state.) To use assert mode, set the CheckStateOnly parameter to true. This mode is useful when running the Sysprep command on Windows, which is an asynchronous command that can run in the background for a long time. You can ensure that the instance is stopped before you create an AMI.","properties":{"inputs":{"properties":{"InstanceIds":{"description":"The IDs of the instances."},"CheckStateOnly":{"description":"If false, sets the instance state to the desired state. If true, asserts the desired state using polling.","type":["boolean","string"],"default":false},"DesiredState":{"description":"The desired state. When set to running, this action waits for the Amazon EC2 state to be Running, the Instance Status to be OK, and the System Status to be OK before completing.","type":"string","oneOf":[{"enum":["running","stopped","terminated"]},{"pattern":"^{{[ ]{0,1}[a-zA-Z_.]+[ ]{0,1}}}$"}]},"Force":{"description":"If set, forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for EC2 instances for Windows Server.","type":["string","boolean"]}},"required":["InstanceIds","DesiredState"]}}}},{"if":{"properties":{"action":{"const":"aws:copyImage"}}},"then":{"description":"Copies an AMI from any region into the current region. This action can also encrypt the new AMI.","properties":{"inputs":{"properties":{"SourceRegion":{"description":"The region where the source AMI currently exists.","type":"string"},"SourceImageId":{"description":"The AMI ID to copy from the source region.","type":"string"},"ImageName":{"description":"The name for the new image.","type":"string"},"ImageDescription":{"description":"A description for the target image.","type":"string"},"Encrypted":{"description":"Encrypt the target AMI.","type":["string","boolean"]},"KmsKeyId":{"description":"The full Amazon Resource Name (ARN) of the AWS Key Management Service CMK to use when encrypting the snapshots of an image during a copy operation.","type":"string"},"ClientToken":{"description":"A unique, case-sensitive identifier that you provide to ensure request idempotency.","type":"string"}},"required":["SourceRegion","SourceImageId","ImageName"]}}}},{"if":{"properties":{"action":{"const":"aws:createImage"}}},"then":{"description":"Creates a new AMI from an instance that is either running or stopped.","properties":{"inputs":{"properties":{"InstanceId":{"description":"The ID of the instance.","type":"string"},"ImageName":{"description":"The name for the image.","type":"string"},"ImageDescription":{"description":"A description of the image.","type":"string"},"NoReboot":{"description":"A boolean literal.\n\nBy default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the No Reboot option is set to true, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.\n\nIf you do not want the instance to run after you create an AMI image from it, first use the aws:changeInstanceState – Change or assert instance state action to stop the instance, and then use this aws:createImage action with the NoReboot option set to true.","type":["string","boolean"]},"BlockDeviceMappings":{"description":"The block devices for the intance.","type":["string","object"]}},"required":["InstanceId","ImageName"]}}}},{"if":{"properties":{"action":{"const":"aws:createStack"}}},"then":{"description":"Creates a new AWS CloudFormation stack from a template.","properties":{"inputs":{"properties":{"Capabilities":{"description":"A list of values that you specify before AWS CloudFormation can create certain stacks. Some stack templates include resources that can affect permissions in your AWS account. For example, creating new AWS Identity and Access Management (IAM) users can affect permissions in your account. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter. \n\nValid values include CAPABILITY_IAM, CAPABILITY_NAMED_IAM, and CAPABILITY_AUTO_EXPAND.\n\nIf you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If you don't specify this parameter, this action returns an InsufficientCapabilities error. The following resources require you to specify either CAPABILITY_IAM or CAPABILITY_NAMED_IAM.\n\n","type":["string","array"],"items":{"type":"string","enum":["CAPABILITY_IAM","CAPABILITY_NAMED_IAM","CAPABILITY_AUTO_EXPAND"]}},"ClientRequestToken":{"description":"A unique identifier for this CreateStack request. Specify this token if you set maxAttempts in this step to a value greater than 1. By specifying this token, AWS CloudFormation knows that you're not attempting to create a new stack with the same name.","type":"string","pattern":"[a-zA-Z0-9][-a-zA-Z0-9]*","maxLength":128,"minLength":1},"DisableRollback":{"description":"Set to true to disable rollback of the stack if stack creation failed.\n\nConditional: You can specify either the DisableRollback parameter or the OnFailure parameter, but not both.","type":["string","boolean"],"default":false},"NotificationARNs":{"description":"The Amazon SNS topic ARNs for publishing stack-related events.","type":["string","array"],"items":{"type":"string"},"maxItems":5},"onFailure":{"description":"Determines the action to take if stack creation failed. You must specify DO_NOTHING, ROLLBACK, or DELETE.\n\nConditional: You can specify either the OnFailure parameter or the DisableRollback parameter, but not both.","type":"string","default":"ROLLBACK","enum":["DO_NOTHING","ROLLBACK","DELETE"]},"Parameters":{"description":"A list of Parameter structures that specify input parameters for the stack.","type":["string","array"],"items":{"type":"object"}},"ResourceTypes":{"description":"The template resource types that you have permissions to work with for this create stack action.","type":["string","array"],"items":{"type":"string"},"minItems":1,"maxItems":256},"RoleARN":{"description":"The Amazon Resource Name (ARN) of an IAM role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants the least amount of privileges.\n\nIf you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.","type":"string","maxLength":2048,"minLength":20},"StackName":{"description":"The name that is associated with the stack. The name must be unique in the region in which you are creating the stack.\n\nA stack name can contain only alphanumeric characters (case sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.","type":"string","maxLength":128},"StackPolicyBody":{"description":"Structure containing the stack policy body.\n\nConditional: You can specify either the StackPolicyBody parameter or the StackPolicyURL parameter, but not both.","type":"string","maxLength":16384,"minLength":1},"StackPolicyURL":{"description":"Location of a file containing the stack policy. The URL must point to a policy located in an S3 bucket in the same region as the stack. The maximum file size allowed for the stack policy is 16 KB.\n\nConditional: You can specify either the StackPolicyBody parameter or the StackPolicyURL parameter, but not both.","type":"string","maxLength":1350,"minLength":1},"Tags":{"description":"Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to the resources created in the stack. You can specify a maximum number of 10 tags."},"TemplateBody":{"description":"Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes.\n\nConditional: You can specify either the TemplateBody parameter or the TemplateURL parameter, but not both.","type":"string","minLength":1},"TemplateURL":{"description":"Location of a file containing the template body. The URL must point to a template that is located in an S3 bucket. The maximum size allowed for the template is 460,800 bytes.\n\nConditional: You can specify either the TemplateBody parameter or the TemplateURL parameter, but not both.","type":"string","maxLength":1024,"minLength":1},"TimeoutInMinutes":{"description":"The amount of time that can pass before the stack status becomes CREATE_FAILED. If DisableRollback is not set or is set to false, the stack will be rolled back.","type":["integer","string"],"minimum":1}},"required":["StackName"]}}}},{"if":{"properties":{"action":{"const":"aws:createTags"}}},"then":{"description":"Create new tags for EC2 instances or Systems Manager managed instances.","properties":{"inputs":{"properties":{"ResourceIds":{"description":"The IDs of the resource(s) to be tagged. If resource type is not “EC2”, this field can contain only a single item.","type":["string","array"],"items":{"type":"string"}},"Tags":{"description":"The tags to associate with resource(s).","type":["string","array"],"items":{"type":"object"}},"ResourceType":{"description":"The type of resource(s) to be tagged. If not supplied, the default value of “EC2” is used.","type":"string","oneOf":[{"enum":["EC2","ManagedInstance","MaintenanceWindow","Parameter"]},{"pattern":"^{{[ ]{0,1}[a-zA-Z_.]+[ ]{0,1}}}$"}]}},"required":["ResourceIds","Tags"]}}}},{"if":{"properties":{"action":{"const":"aws:deleteImage"}}},"then":{"description":"Deletes the specified image and all related snapshots.","properties":{"inputs":{"properties":{"ImageId":{"description":"The ID of the image to be deleted.","type":"string"}},"required":["ImageId"]}}}},{"if":{"properties":{"action":{"const":"aws:deleteStack"}}},"then":{"description":"Deletes an AWS CloudFormation stack.","properties":{"inputs":{"properties":{"ClientRequestToken":{"description":"A unique identifier for this DeleteStack request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to delete a stack with the same name. You can retry DeleteStack requests to verify that AWS CloudFormation received them.","type":"string","oneOf":[{"pattern":"[a-zA-Z][-a-zA-Z0-9]*","maxLength":128,"minLength":1},{"pattern":"^{{[ ]{0,1}[a-zA-Z_.]+[ ]{0,1}}}$"}]},"StackName":{"description":"The name or the unique stack ID that is associated with the stack.","type":"string"},"RoleARN":{"description":"The Amazon Resource Name (ARN) of an IAM role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants the least amount of privileges.\n\nIf you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.","type":"string","maxLength":2048,"minLength":20},"RetainResources.member.N":{"description":"This input applies only to stacks that are in a DELETE_FAILED state. A list of logical resource IDs for the resources you want to retain. During deletion, AWS CloudFormation deletes the stack, but does not delete the retained resources.\n\nRetaining resources is useful when you can't delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.","type":["string","array"]}},"required":["StackName"]}}}},{"if":{"properties":{"action":{"const":"aws:executeAutomation"}}},"then":{"description":"Runs a secondary Automation workflow by calling a secondary Automation document. With this action, you can create Automation documents for your most common workflows, and reference those documents during an Automation execution. This action can simplify your Automation documents by removing the need to duplicate steps across similar documents.\n\nThe secondary Automation runs in the context of the user who initiated the primary Automation. This means that the secondary Automation uses the same IAM role or user account as the user who started the first Automation.","properties":{"inputs":{"properties":{"DocumentName":{"description":"The name of the secondary Automation document to run during the step. The document must belong to the same AWS account as the primary Automation document.","type":"string"},"DocumentVersion":{"description":"The version of the secondary Automation document to run. If not specified, Automation runs the default document version.","type":"string"},"RuntimeParameters":{"description":"Required parameters for the secondary document execution. The mapping uses the following format: {\"parameter1\" : [\"value1\"], \"parameter2\" : [\"value2\"] }","type":["string","object"]}},"required":["DocumentName"]}}}},{"if":{"properties":{"action":{"const":"aws:executeAwsApi"}}},"then":{"description":"Calls and runs AWS API actions. Most API actions are supported, although not all API actions have been tested.","properties":{"inputs":{"properties":{"Service":{"description":"The AWS service namespace that contains the API action that you want to run.","type":"string"},"Api":{"description":"The name of the API action that you want to run.","type":"string"}},"additionalProperties":true,"required":["Service"]}}}},{"if":{"properties":{"action":{"const":"aws:executeScript"}}},"then":{"description":"Runs the Python or PowerShell script provided, using the specified runtime and handler. (For PowerShell, the handler is not required.)\n\nCurrently, the aws:executeScript action contains the following preinstalled PowerShell Core modules.\n\n\tMicrosoft.PowerShell.Host\n\n\tMicrosoft.PowerShell.Management\n\n\tMicrosoft.PowerShell.Security\n\n\tMicrosoft.PowerShell.Utility\n\n\tPackageManagement\n\n\tPowerShellGet","properties":{"inputs":{"properties":{"Runtime":{"description":"The runtime language to be used for executing the provided script. Currently, aws:executeScript supports Python 3.6 (python3.6), Python 3.7 (python3.7), and PowerShell Core 6.0 (dotnetcore2.1) scripts.","type":"string","oneOf":[{"enum":["python3.6","python3.7","PowerShell Core 6.0"]},{"pattern":"^{{[ ]{0,1}[a-zA-Z_.]+[ ]{0,1}}}$"}]},"Handler":{"description":"The entry for script execution, usually a function name. You must ensure the function defined in the handler has two parameters, events and context. (Not required for PowerShell.)","type":"string"},"InputPayload":{"description":"A JSON or YAML object that will be passed to the first parameter of the handler. This can be used to pass input data to the script.","type":["string","object"]},"Script":{"description":"An embedded script that you want to run during the automation execution. (Not supported for JSON documents.)","type":["string"]},"Attachment":{"description":"The name of a standalone script file or .zip file that can be invoked by the action. To invoke a file for python, use the filename.method_name format in Handler. For PowerShell, invoke the attachment using and inline script. Gzip is not supported.","type":"string"}},"required":["Runtime"]}}}},{"if":{"properties":{"action":{"const":"aws:executeStateMachine"}}},"then":{"description":"Run an AWS Step Functions state machine.","properties":{"inputs":{"properties":{"stateMachineArn":{"description":"The ARN of the Step Functions state machine.","type":"string"},"name":{"description":"The name of the execution.","type":"string"},"input":{"description":"A string that contains the JSON input data for the execution.","type":"string"}},"required":["stateMachineArn"]}}}},{"if":{"properties":{"action":{"const":"aws:invokeLambdaFunction"}}},"then":{"description":"Invokes the specified Lambda function.","properties":{"inputs":{"properties":{"FunctionName":{"description":"The name of the Lambda function. This function must exist.","type":"string"},"Qualifier":{"description":"The function version or alias name.","type":"string"},"InvocationType":{"description":"The invocation type. The default is RequestResponse.","type":"string","oneOf":[{"enum":["Event","RequestResponse","DryRun"]},{"pattern":"^{{[ ]{0,1}[a-zA-Z_.]+[ ]{0,1}}}$"}]},"LogType":{"description":"If Tail, the invocation type must be RequestResponse. AWS Lambda returns the last 4 KB of log data produced by your Lambda function, base64-encoded.","type":"string","oneOf":[{"enum":["None","Tail"]},{"pattern":"^{{[ ]{0,1}[a-zA-Z_.]+[ ]{0,1}}}$"}]},"ClientContext":{"description":"The client-specific information."},"Payload":{"description":"The JSON input for your lambda function."}},"required":["FunctionName"]}}}},{"if":{"properties":{"action":{"const":"aws:pause"}}},"then":{"description":"This action pauses the Automation execution. Once paused, the execution status is Waiting. To continue the Automation execution, use the SendAutomationSignal API action with the Resume signal type."}},{"if":{"properties":{"action":{"const":"aws:runCommand"}}},"then":{"description":"Runs the specified commands.\n\nAutomation only supports output of one Run Command action. A document can include multiple Run Command actions, but output is supported for only one action at a time.","properties":{"inputs":{"properties":{"DocumentName":{"description":"The name of the Run Command document.","type":"string"},"InstanceIds":{"description":"The instance IDs where you want the command to run. You can specify a maximum of 50 IDs.\n\nYou can also use the pseudo parameter {{RESOURCE_ID}} in place of instance IDs to more easily run the command on all instances in the target group.\n\nAnother alternative is to send commands to a fleet of instances by using the Targets parameter. The Targets parameter accepts Amazon EC2 tags.","type":["string","array"],"items":{"type":"string"}},"Targets":{"description":"An array of search criteria that targets instances by using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.","type":["string","array"],"items":{"type":"object"}},"Parameters":{"description":"The required and optional parameters specified in the document.","type":["string","object"]},"CloudWatchOutputConfig":{"description":"Configuration options for sending command output to Amazon CloudWatch Logs.","type":["object","string"]},"Comment":{"description":"User-defined information about the command.","type":"string"},"DocumentHash":{"description":"The hash for the document.","type":"string"},"DocumentHashType":{"description":"The type of the hash.","type":"string","oneOf":[{"enum":["Sha256","Sha1"]},{"pattern":"^{{[ ]{0,1}[a-zA-Z_.]+[ ]{0,1}}}$"}]},"NotificationConfig":{"description":"The configurations for sending notifications."},"OutputS3BucketName":{"description":"The name of the S3 bucket for command execution responses.","type":"string"},"OutputS3KeyPrefix":{"description":"The prefix.","type":"string"},"ServiceRoleArn":{"description":"The ARN of the IAM role.","type":"string"},"TimeoutSeconds":{"description":"THe run-command timeout value, in seconds.","type":["string","integer"]}},"required":["DocumentName"]}}}},{"if":{"properties":{"action":{"const":"aws:runInstances"}}},"then":{"description":"Launches a new instance.","properties":{"inputs":{"properties":{"ImageId":{"description":"The ID of the Amazon Machine Image (AMI).","type":"string"},"InstanceType":{"description":"The instance type. \n\nIf an instance type value is not provided, the m1.small instance type is used.","type":"string"},"MinInstanceCount":{"description":"The minimum number of instances to be launched.","type":["integer","string"]},"MaxInstanceCount":{"description":"The maximum number of instances to be launched.","type":["integer","string"]},"AdditionalInfo":{"description":"Reserved.","type":"string"},"BlockDeviceMappings":{"description":"The block devices for the instance.","type":["string","array"],"items":{"type":"object"}},"ClientToken":{"description":"The identifier to ensure idempotency of the request.","type":"string"},"DisableApiTermination":{"description":"Enables or disables instance API termination.","type":["boolean","string"]},"EbsOptimized":{"description":"Enables or disables EBS optimization.","type":["boolean","string"]},"IamInstanceProfileArn":{"description":"The ARN of the IAM instance profile for the instance.","type":"string"},"IamInstanceProfileName":{"description":"The name of the IAM instance profile for the instance.","type":"string"},"InstanceInitiatedShutdownBehavior":{"description":"Indicates whether the instance stops or terminates on system shutdown.","type":"string"},"KernelId":{"description":"The ID of the kernel.","type":"string"},"KeyName":{"description":"The name of the key pair.","type":"string"},"Monitoring":{"description":"Enables or disables detailed monitoring.","type":["string","boolean"]},"NetworkInterfaces":{"description":"The network interfaces."},"Placement":{"description":"The placement for the instance.","type":["object","string"]},"PrivateIpAddress":{"description":"The primary IPv4 address.","type":"string"},"RamdiskId":{"description":"The ID of the RAM disk.","type":"string"},"SecurityGroupIds":{"description":"The IDs of the security groups for the instance."},"SecurityGroup":{"description":"The names of the security groups for the instance."},"SubnetId":{"description":"The subnet ID.","type":"string"},"TagSpecifications":{"description":"The tags to apply to the resources during launch. You can only tag instances and volumes at launch. The specified tags are applied to all instances or volumes that are created during launch. To tag an instance after it has been launched, use the aws:createTags – Create tags for AWS resources action."},"UserData":{"description":"An execution script provided as a string literal value. If a literal value is entered, then it must be Base64-encoded.","type":"string"}},"required":["ImageId"]}}}},{"if":{"properties":{"action":{"const":"aws:sleep"}}},"then":{"description":"Delays Automation execution for a specified amount of time. This action uses the International Organization for Standardization (ISO) 8601 date and time format.\n\nAutomation currently supports a maximum delay of 604800 seconds (7 days).","properties":{"inputs":{"properties":{"Duration":{"description":"An ISO 8601 duration. You can't specify a negative duration.","type":"string"},"TimeStamp":{"description":"An ISO 8601 timestamp. If you don't specify a value for this parameter, then you must specify a value for the Duration parameter.","type":"string"}}}}}},{"if":{"properties":{"action":{"const":"aws:waitForAwsResourceProperties"}}},"then":{"description":"The aws:waitForAwsResourceProperty action enables your Automation workflow to wait for a specific resource state or event state before continuing the workflow.","properties":{"inputs":{"properties":{"Service":{"description":"The AWS service namespace that contains the API action that you want to run. For example, the namespace for Systems Manager is ssm. The namespace for Amazon EC2 is ec2.","type":"string"},"Api":{"description":"The name of the API action that you want to run.","type":"string"},"PropertySelector":{"description":"The JSONPath to a specific attribute in the response object."},"DesiredValues":{"description":"The expected status or state on which to continue the Automation workflow."}},"additionalProperties":true,"required":["Service","Api","PropertySelector","DesiredValues"]}}}}],"defaultSnippets":[{"label":"Snippet: aws:approve","description":"Temporarily pauses an Automation execution until designated principals either approve or reject the action. After the required number of approvals is reached, the Automation execution resumes. You can insert the approval step any place in the mainSteps section of your Automation document.","body":{"name":"${1:approve}","action":"aws:approve","inputs":{"NotificationArn":"arn:aws:sns:us-east-2:12345678901:AutomationApproval","Message":"Please approve this step of the Automation.","MinRequiredApprovals":3,"Approvers":["IamUser1","IamUser2","arn:aws:iam::12345678901:user/IamUser3","arn:aws:iam::12345678901:role/IamRole"]}}},{"label":"Snippet: aws:assertAwsResourceProperty","description":"The aws:assertAwsResourceProperty action enables you to assert a specific resource state or event state for a specific Automation step.For example, you can specify that an Automation step must wait for an EC2 instance to start. Then it will call the Amazon EC2 DescribeInstanceStatus API action with the DesiredValue property of running. This ensures that the Automation workflow waits for a running instance and then continues when the instance is, in fact, running.","body":{"name":"${1:assertAwsResourceProperty}","action":"aws:assertAwsResourceProperty","inputs":{"Service":"The official namespace of the service","Api":"The API action or method name","API action inputs or parameters":"A value","PropertySelector":"Response object","DesiredValues":["Desired property values"]}}},{"label":"Snippet: aws:branch","description":"The aws:branch action enables you to create a dynamic Automation workflow that evaluates different choices in a single step and then jumps to a different step in the Automation document based on the results of that evaluation. \n\nWhen you specify the aws:branch action for a step, you specify Choices that the workflow must evaluate. The Choices can be based on either a value that you specified in the Parameters section of the Automation document, or a dynamic value generated as the output from the previous step. The Automation workflow evaluates each choice by using a Boolean expression. If the first choice is true, then the workflow jumps to the step designated for that choice. If the first choice is false, the workflow evaluates the next choice. The workflow continues evaluating each choice until it process a true choice. The workflow then jumps to the designated step for the true choice. \n\nIf none of the choices are true, the workflow checks to see if the step contains a default value. A default value defines a step that the workflow should jump to if none of the choices are true. If no default value is specified for the step, then the Automation workflow processes the next step in the document.\n\nThe aws:branch action supports complex choice evaluations by using a combination of And, Not, and Or operators.","body":{"name":"${1:branch}","action":"aws:branch","inputs":{"Choices":[{"NextStep":"runWindowsCommand","Variable":"{{Name of a parameter defined in the Parameters section. For example: OS_name}}","StringEquals":"windows"},{"NextStep":"runLinuxCommand","Variable":"{{Name of a parameter defined in the Parameters section. For example: OS_name}}","StringEquals":"linux"}],"Default":"sleep3"}}},{"label":"Snippet: aws:changeInstanceState","description":"Changes or asserts the state of the instance.\n\nThis action can be used in assert mode (do not run the API to change the state but verify the instance is in the desired state.) To use assert mode, set the CheckStateOnly parameter to true. This mode is useful when running the Sysprep command on Windows, which is an asynchronous command that can run in the background for a long time. You can ensure that the instance is stopped before you create an AMI.","body":{"name":"${1:changeInstanceState}","action":"aws:changeInstanceState","maxAttempts":3,"timeoutSeconds":3600,"onFailure":"Abort","inputs":{"InstanceIds":["i-1234567890abcdef0"],"CheckStateOnly":true,"DesiredState":"stopped"}}},{"label":"Snippet: aws:copyImage","description":"Copies an AMI from any region into the current region. This action can also encrypt the new AMI.","body":{"name":"${1:copyImage}","action":"aws:copyImage","maxAttempts":3,"onFailure":"Abort","inputs":{"SourceImageId":"ami-0fe10819","SourceRegion":"ap-northeast-2","ImageName":"Encrypted Copy of LAMP base AMI in ap-northeast-2","Encrypted":true}}},{"label":"Snippet: aws:createImage","description":"Creates a new AMI from an instance that is either running or stopped.","body":{"name":"${1:createImage}","action":"aws:createImage","maxAttempts":3,"onFailure":"Abort","inputs":{"InstanceId":"i-1234567890abcdef0","ImageName":"AMI Created on{{global:DATE_TIME}}","NoReboot":true,"ImageDescription":"My newly created AMI"}}},{"label":"Snippet: aws:createStack","description":"Creates a new AWS CloudFormation stack from a template.","body":{"name":"${1:createStack}","action":"aws:createStack","maxAttempts":1,"onFailure":"Abort","inputs":{"Capabilities":["CAPABILITY_IAM"],"StackName":"myStack","TemplateURL":"http://s3.amazonaws.com/doc-example-bucket/myStackTemplate","TimeoutInMinutes":5}}},{"label":"Snippet: aws:createTags","description":"Create new tags for EC2 instances or Systems Manager managed instances.","body":{"name":"${1:createTags}","action":"aws:createTags","maxAttempts":3,"onFailure":"Abort","inputs":{"ResourceType":"EC2","ResourceIds":["ami-9a3768fa","i-02951acd5111a8169"],"Tags":[{"Key":"production","Value":""},{"Key":"department","Value":"devops"}]}}},{"label":"Snippet: aws:deleteImage","description":"Deletes the specified image and all related snapshots.","body":{"name":"${1:deleteImage}","action":"aws:deleteImage","maxAttempts":3,"timeoutSeconds":180,"onFailure":"Abort","inputs":{"ImageId":"ami-12345678"}}},{"label":"Snippet: aws:deleteStack","description":"Deletes an AWS CloudFormation stack.","body":{"name":"${1:deleteStack}","action":"aws:deleteStack","maxAttempts":1,"onFailure":"Abort","inputs":{"StackName":"{{stackName}}"}}},{"label":"Snippet: aws:executeAutomation","description":"Runs a secondary Automation workflow by calling a secondary Automation document. With this action, you can create Automation documents for your most common workflows, and reference those documents during an Automation execution. This action can simplify your Automation documents by removing the need to duplicate steps across similar documents.\n\nThe secondary Automation runs in the context of the user who initiated the primary Automation. This means that the secondary Automation uses the same IAM role or user account as the user who started the first Automation.","body":{"name":"${1:executeAutomation}","action":"aws:executeAutomation","maxAttempts":3,"timeoutSeconds":3600,"onFailure":"Abort","inputs":{"DocumentName":"secondaryWorkflow","RuntimeParameters":{"instanceIds":["i-1234567890abcdef0"]}}}},{"label":"Snippet: aws:executeAwsApi","description":"Calls and runs AWS API actions. Mos