Class: AWSCDK::SSM::CfnMaintenanceWindowTask::MaintenanceWindowRunCommandParametersProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SSM::CfnMaintenanceWindowTask::MaintenanceWindowRunCommandParametersProperty
- Defined in:
- ssm/cfn_maintenance_window_task.rb
Overview
The MaintenanceWindowRunCommandParameters property type specifies the parameters for a RUN_COMMAND task type for a maintenance window task in AWS Systems Manager .
This means that these parameters are the same as those for the SendCommand API call. For more information about SendCommand parameters, see SendCommand in the AWS Systems Manager API Reference .
For information about available parameters in SSM Command documents, you can view the content of the document itself in the Systems Manager console. For information, see Viewing SSM command document content in the AWS Systems Manager User Guide .
MaintenanceWindowRunCommandParameters is a property of the TaskInvocationParameters property type.
Instance Attribute Summary collapse
-
#cloud_watch_output_config ⇒ AWSCDK::IResolvable, ...
readonly
Configuration options for sending command output to Amazon CloudWatch Logs.
-
#comment ⇒ String?
readonly
Information about the command or commands to run.
-
#document_hash ⇒ String?
readonly
The SHA-256 or SHA-1 hash created by the system when the document was created.
-
#document_hash_type ⇒ String?
readonly
The SHA-256 or SHA-1 hash type.
-
#document_version ⇒ String?
readonly
The AWS Systems Manager document (SSM document) version to use in the request.
-
#notification_config ⇒ AWSCDK::IResolvable, ...
readonly
Configurations for sending notifications about command status changes on a per-managed node basis.
-
#output_s3_bucket_name ⇒ String?
readonly
The name of the Amazon Simple Storage Service (Amazon S3) bucket.
-
#output_s3_key_prefix ⇒ String?
readonly
The S3 bucket subfolder.
-
#parameters ⇒ Object?
readonly
The parameters for the
RUN_COMMANDtask execution. -
#service_role_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the IAM service role for AWS Systems Manager to assume when running a maintenance window task.
-
#timeout_seconds ⇒ Numeric?
readonly
If this time is reached and the command hasn't already started running, it doesn't run.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cloud_watch_output_config: nil, comment: nil, document_hash: nil, document_hash_type: nil, document_version: nil, notification_config: nil, output_s3_bucket_name: nil, output_s3_key_prefix: nil, parameters: nil, service_role_arn: nil, timeout_seconds: nil) ⇒ MaintenanceWindowRunCommandParametersProperty
constructor
A new instance of MaintenanceWindowRunCommandParametersProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cloud_watch_output_config: nil, comment: nil, document_hash: nil, document_hash_type: nil, document_version: nil, notification_config: nil, output_s3_bucket_name: nil, output_s3_key_prefix: nil, parameters: nil, service_role_arn: nil, timeout_seconds: nil) ⇒ MaintenanceWindowRunCommandParametersProperty
Returns a new instance of MaintenanceWindowRunCommandParametersProperty.
912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 |
# File 'ssm/cfn_maintenance_window_task.rb', line 912 def initialize(cloud_watch_output_config: nil, comment: nil, document_hash: nil, document_hash_type: nil, document_version: nil, notification_config: nil, output_s3_bucket_name: nil, output_s3_key_prefix: nil, parameters: nil, service_role_arn: nil, timeout_seconds: nil) @cloud_watch_output_config = cloud_watch_output_config.is_a?(Hash) ? ::AWSCDK::SSM::CfnMaintenanceWindowTask::CloudWatchOutputConfigProperty.new(**cloud_watch_output_config.transform_keys(&:to_sym)) : cloud_watch_output_config Jsii::Type.check_type(@cloud_watch_output_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zc20uQ2ZuTWFpbnRlbmFuY2VXaW5kb3dUYXNrLkNsb3VkV2F0Y2hPdXRwdXRDb25maWdQcm9wZXJ0eSJ9XX19")), "cloudWatchOutputConfig") unless @cloud_watch_output_config.nil? @comment = comment Jsii::Type.check_type(@comment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comment") unless @comment.nil? @document_hash = document_hash Jsii::Type.check_type(@document_hash, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentHash") unless @document_hash.nil? @document_hash_type = document_hash_type Jsii::Type.check_type(@document_hash_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentHashType") unless @document_hash_type.nil? @document_version = document_version Jsii::Type.check_type(@document_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentVersion") unless @document_version.nil? @notification_config = notification_config.is_a?(Hash) ? ::AWSCDK::SSM::CfnMaintenanceWindowTask::NotificationConfigProperty.new(**notification_config.transform_keys(&:to_sym)) : notification_config Jsii::Type.check_type(@notification_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zc20uQ2ZuTWFpbnRlbmFuY2VXaW5kb3dUYXNrLk5vdGlmaWNhdGlvbkNvbmZpZ1Byb3BlcnR5In1dfX0=")), "notificationConfig") unless @notification_config.nil? @output_s3_bucket_name = output_s3_bucket_name Jsii::Type.check_type(@output_s3_bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outputS3BucketName") unless @output_s3_bucket_name.nil? @output_s3_key_prefix = output_s3_key_prefix Jsii::Type.check_type(@output_s3_key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outputS3KeyPrefix") unless @output_s3_key_prefix.nil? @parameters = parameters Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "parameters") unless @parameters.nil? @service_role_arn = service_role_arn Jsii::Type.check_type(@service_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceRoleArn") unless @service_role_arn.nil? @timeout_seconds = timeout_seconds Jsii::Type.check_type(@timeout_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeoutSeconds") unless @timeout_seconds.nil? end |
Instance Attribute Details
#cloud_watch_output_config ⇒ AWSCDK::IResolvable, ... (readonly)
Configuration options for sending command output to Amazon CloudWatch Logs.
941 942 943 |
# File 'ssm/cfn_maintenance_window_task.rb', line 941 def cloud_watch_output_config @cloud_watch_output_config end |
#comment ⇒ String? (readonly)
Information about the command or commands to run.
946 947 948 |
# File 'ssm/cfn_maintenance_window_task.rb', line 946 def comment @comment end |
#document_hash ⇒ String? (readonly)
The SHA-256 or SHA-1 hash created by the system when the document was created.
SHA-1 hashes have been deprecated.
953 954 955 |
# File 'ssm/cfn_maintenance_window_task.rb', line 953 def document_hash @document_hash end |
#document_hash_type ⇒ String? (readonly)
The SHA-256 or SHA-1 hash type.
SHA-1 hashes are deprecated.
960 961 962 |
# File 'ssm/cfn_maintenance_window_task.rb', line 960 def document_hash_type @document_hash_type end |
#document_version ⇒ String? (readonly)
The AWS Systems Manager document (SSM document) version to use in the request.
You can specify $DEFAULT , $LATEST , or a specific version number. If you run commands by using the AWS CLI, then you must escape the first two options by using a backslash. If you specify a version number, then you don't need to use the backslash. For example:
--document-version "\$DEFAULT"
--document-version "\$LATEST"
--document-version "3"
973 974 975 |
# File 'ssm/cfn_maintenance_window_task.rb', line 973 def document_version @document_version end |
#notification_config ⇒ AWSCDK::IResolvable, ... (readonly)
Configurations for sending notifications about command status changes on a per-managed node basis.
978 979 980 |
# File 'ssm/cfn_maintenance_window_task.rb', line 978 def notification_config @notification_config end |
#output_s3_bucket_name ⇒ String? (readonly)
The name of the Amazon Simple Storage Service (Amazon S3) bucket.
983 984 985 |
# File 'ssm/cfn_maintenance_window_task.rb', line 983 def output_s3_bucket_name @output_s3_bucket_name end |
#output_s3_key_prefix ⇒ String? (readonly)
The S3 bucket subfolder.
988 989 990 |
# File 'ssm/cfn_maintenance_window_task.rb', line 988 def output_s3_key_prefix @output_s3_key_prefix end |
#parameters ⇒ Object? (readonly)
The parameters for the RUN_COMMAND task execution.
The supported parameters are the same as those for the SendCommand API call. For more information, see SendCommand in the AWS Systems Manager API Reference .
995 996 997 |
# File 'ssm/cfn_maintenance_window_task.rb', line 995 def parameters @parameters end |
#service_role_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the IAM service role for AWS Systems Manager to assume when running a maintenance window task.
If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run RegisterTaskWithMaintenanceWindow .
However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see Setting up Maintenance Windows in the in the AWS Systems Manager User Guide .
1004 1005 1006 |
# File 'ssm/cfn_maintenance_window_task.rb', line 1004 def service_role_arn @service_role_arn end |
#timeout_seconds ⇒ Numeric? (readonly)
If this time is reached and the command hasn't already started running, it doesn't run.
1009 1010 1011 |
# File 'ssm/cfn_maintenance_window_task.rb', line 1009 def timeout_seconds @timeout_seconds end |
Class Method Details
.jsii_properties ⇒ Object
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 |
# File 'ssm/cfn_maintenance_window_task.rb', line 1011 def self.jsii_properties { :cloud_watch_output_config => "cloudWatchOutputConfig", :comment => "comment", :document_hash => "documentHash", :document_hash_type => "documentHashType", :document_version => "documentVersion", :notification_config => "notificationConfig", :output_s3_bucket_name => "outputS3BucketName", :output_s3_key_prefix => "outputS3KeyPrefix", :parameters => "parameters", :service_role_arn => "serviceRoleArn", :timeout_seconds => "timeoutSeconds", } end |
Instance Method Details
#to_jsii ⇒ Object
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 |
# File 'ssm/cfn_maintenance_window_task.rb', line 1027 def to_jsii result = {} result.merge!({ "cloudWatchOutputConfig" => @cloud_watch_output_config, "comment" => @comment, "documentHash" => @document_hash, "documentHashType" => @document_hash_type, "documentVersion" => @document_version, "notificationConfig" => @notification_config, "outputS3BucketName" => @output_s3_bucket_name, "outputS3KeyPrefix" => @output_s3_key_prefix, "parameters" => @parameters, "serviceRoleArn" => @service_role_arn, "timeoutSeconds" => @timeout_seconds, }) result.compact end |