AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Get-SSMDeployablePatchSnapshotForInstance-SnapshotId <String>-BaselineOverride_ApprovedPatch <String[]>-BaselineOverride_ApprovedPatchesComplianceLevel <PatchComplianceLevel>-BaselineOverride_ApprovedPatchesEnableNonSecurity <Boolean>-InstanceId <String>-BaselineOverride_OperatingSystem <OperatingSystem>-GlobalFilters_PatchFilter <PatchFilter[]>-ApprovalRules_PatchRule <PatchRule[]>-BaselineOverride_RejectedPatch <String[]>-BaselineOverride_RejectedPatchesAction <PatchAction>-BaselineOverride_Source <PatchSource[]>-Select <String>-PassThru <SwitchParameter>-ClientConfig <AmazonSimpleSystemsManagementConfig>
AWS-RunPatchBaseline
Systems Manager document (SSM document).
If you run the command locally, such as with the Command Line Interface (CLI), the system attempts to use your local Amazon Web Services credentials and the operation fails. To avoid this, you can run the command in the Amazon Web Services Systems Manager console. Use Run Command, a capability of Amazon Web Services Systems Manager, with an SSM document that enables you to target a managed node with a script or command. For example, run the command using the AWS-RunShellScript
document or the AWS-RunPowerShellScript
document. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | BaselineOverride_ApprovalRules_PatchRules |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | BaselineOverride_ApprovedPatches |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
false
. Applies to Linux managed nodes only. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | BaselineOverride_RejectedPatches |
RejectedPackages
list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | BaselineOverride_Sources |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | BaselineOverride_GlobalFilters_PatchFilters |
Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
AWS-RunPatchBaseline
. Required? | True |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
$credentials = [Amazon.Runtime.InstanceProfileAWSCredentials]::new()
Get-SSMDeployablePatchSnapshotForInstance -SnapshotId "4681775b-098f-4435-a956-0ef33373ac11" -InstanceId "i-0cb2b964d3e14fd9f" -Credentials $credentials
InstanceId SnapshotDownloadUrl
---------- -------------------
i-0cb2b964d3e14fd9f https://patch-baseline-snapshot-us-west-2.s3-us-west-2.amazonaws.com/853d0d3db0f0cafe...1692/4681775b-098f-4435...This example displays the current snapshot for the patch baseline used by an Instance. This command must be run from the instance using the instance credentials. To ensure it uses the instance credentials, the example passes an Amazon.Runtime.InstanceProfileAWSCredentials object to the Credentials parameter.
Set-AWSCredential -Credential ([Amazon.Runtime.InstanceProfileAWSCredentials]::new())
(Get-SSMDeployablePatchSnapshotForInstance -SnapshotId "4681775b-098f-4435-a956-0ef33373ac11" -InstanceId "i-0cb2b964d3e14fd9f").SnapshotDownloadUrl
https://patch-baseline-snapshot-us-west-2.s3-us-west-2.amazonaws.com/853d0d3db0f0cafe...This example shows how to get the full SnapshotDownloadUrl. This command must be run from the instance using the instance credentials. To ensure it uses the instance credentials, the example configures the PowerShell session to use an Amazon.Runtime.InstanceProfileAWSCredentials object.
AWS Tools for PowerShell: 2.x.y.z