How to use update_maintenance_window_task method in localstack

Best Python code snippet using localstack_python

client.py

Source:client.py Github

copy

Full Screen

...234 def update_maintenance_window(self, WindowId: str, Name: str = None, Description: str = None, StartDate: str = None, EndDate: str = None, Schedule: str = None, ScheduleTimezone: str = None, Duration: int = None, Cutoff: int = None, AllowUnassociatedTargets: bool = None, Enabled: bool = None, Replace: bool = None) -> Dict:235 pass236 def update_maintenance_window_target(self, WindowId: str, WindowTargetId: str, Targets: List = None, OwnerInformation: str = None, Name: str = None, Description: str = None, Replace: bool = None) -> Dict:237 pass238 def update_maintenance_window_task(self, WindowId: str, WindowTaskId: str, Targets: List = None, TaskArn: str = None, ServiceRoleArn: str = None, TaskParameters: Dict = None, TaskInvocationParameters: Dict = None, Priority: int = None, MaxConcurrency: str = None, MaxErrors: str = None, LoggingInfo: Dict = None, Name: str = None, Description: str = None, Replace: bool = None) -> Dict:239 pass240 def update_managed_instance_role(self, InstanceId: str, IamRole: str) -> Dict:241 pass242 def update_patch_baseline(self, BaselineId: str, Name: str = None, GlobalFilters: Dict = None, ApprovalRules: Dict = None, ApprovedPatches: List = None, ApprovedPatchesComplianceLevel: str = None, ApprovedPatchesEnableNonSecurity: bool = None, RejectedPatches: List = None, RejectedPatchesAction: str = None, Description: str = None, Sources: List = None, Replace: bool = None) -> Dict:243 pass244 def update_service_setting(self, SettingId: str, SettingValue: str) -> Dict:...

Full Screen

Full Screen

__init__.py

Source:__init__.py Github

copy

Full Screen

...143 print("%s" %e)144 145def UpdateTask(ssm, Window_ID, Task_ID, task_name, mw_targets, s3_bucket, s3_folder):146 try:147 ssm.update_maintenance_window_task(148 WindowId = Window_ID,149 WindowTaskId = Task_ID,150 Name=task_name,151 Targets=[152 {153 'Key': 'WindowTargetIds',154 'Values': mw_targets155 }156 ],157 TaskArn='AWS-RunPatchBaseline',158 MaxConcurrency='50',159 MaxErrors='50',160 Priority=1,161 TaskInvocationParameters={162 'RunCommand': {163 'OutputS3BucketName': s3_bucket,164 'OutputS3KeyPrefix': s3_folder,165 'Parameters': {166 'Operation': [167 'Install'168 ]169 }170 }171 }172 )173 print("Install_Patch task already exist and update successfully! MW_TASK ID is %s." %Task_ID)174 except:175 print("Install_Patch task already exist but update failed! MW_TASK ID is %s." %Task_ID)176 e=sys.exc_info()[1]177 print("%s" %e)178def RegisterLinuxRunCMD(ssm, Window_ID, task_name, mw_targets, s3_bucket, s3_folder, cmd):179 try:180 ssm.register_task_with_maintenance_window(181 Name = task_name,182 WindowId = Window_ID,183 Targets=[184 {185 'Key': 'WindowTargetIds',186 'Values': mw_targets187 }188 ],189 TaskArn='AWS-RunShellScript',190 TaskType='RUN_COMMAND',191 MaxConcurrency='50',192 MaxErrors='50',193 Priority=5,194 TaskInvocationParameters={195 'RunCommand': {196 'OutputS3BucketName': s3_bucket,197 'OutputS3KeyPrefix': s3_folder,198 'Parameters': {199 'commands': [200 cmd201 ]202 }203 }204 }205 )206 print("Register Install_Patch task with Maintenance Window %s successfully!" %Window_ID)207 except:208 print("Register Install_Patch task with Maintenance Window %s failed!" %Window_ID)209 e = sys.exc_info()[1]210 print("%s" %e)211def UpdateLinuxRunCMD(ssm, Window_ID, Task_ID, task_name, mw_targets, s3_bucket, s3_folder, cmd):212 try:213 ssm.update_maintenance_window_task(214 WindowId = Window_ID,215 WindowTaskId = Task_ID,216 Name=task_name,217 Targets=[218 {219 'Key': 'WindowTargetIds',220 'Values': mw_targets221 }222 ],223 TaskArn='AWS-RunShellScript',224 MaxConcurrency='50',225 MaxErrors='50',226 Priority=5,227 TaskInvocationParameters={...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful