< Back

Disable-GceImage

Mon Jan 13, 2020 11:06 pm

NAME Disable-GceImage



SYNOPSIS

Marks an image or schedules an image to be marked as DEPRECATED, OBSOLETE, or DELETED.





SYNTAX

Disable-GceImage [-Project <string>] [-Name] <string> [-Replacement <Image>] [-ReplacementUrl <string>] [-State]

{DEPRECATED | OBSOLETE | DELETED} [-DeprecateOn <DateTimeOffset>] [-ObsoleteOn <DateTimeOffset>] [-DeleteOn

<DateTimeOffset>] [<CommonParameters>]



Disable-GceImage [-Object] <Image> [-Replacement <Image>] [-ReplacementUrl <string>] [-State] {DEPRECATED |

OBSOLETE | DELETED} [-DeprecateOn <DateTimeOffset>] [-ObsoleteOn <DateTimeOffset>] [-DeleteOn <DateTimeOffset>]

[<CommonParameters>]





DESCRIPTION

Marks an image or schedules an image to be marked as DEPRECATED, OBSOLETE, or DELETED.





PARAMETERS

-Project <string>

The project that owns the image to disable. Defaults to the gcloud config project.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string>

The name of the image to disable.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Object <Image>

The Image object that describes the image to disable.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Replacement <Image>

The Image object that is the suggested replacement for the image being disabled.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ReplacementUrl <string>

The url of the image that is the suggested replacement for the image being disabled.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-State <ImageDisableState>

The new state of the image.



Possible values: DEPRECATED, OBSOLETE, DELETED



Required? true

Position? 1

Default value DEPRECATED

Accept pipeline input? false

Accept wildcard characters? false



-DeprecateOn <DateTimeOffset>

The date to mark the image as deprecated.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ObsoleteOn <DateTimeOffset>

The date to mark the image as obsolete.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DeleteOn <DateTimeOffset>

The date to mark the image as deleted. The image will only be marked, and not actually destroyed until a

request is made to remove it.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String

The name of the image to disable.



Google.Apis.Compute.v1.Data.Image

The Image object that describes the image to disable.





OUTPUTS

Google.Apis.Compute.v1.Data.Image





---------- EXAMPLE 1 ----------



PS C:\\> $image2 = Get-GceImage "my-new-image" -Project "my-project"

PS C:\\> Disable-GceImage "my-old-image" -State DEPRECATED -Replacement $image2



Marks the image named "my-old-image" as deprecated, and sets "my-new-image" as its replacement.

---------- EXAMPLE 2 ----------



PS C:\\> $image1 = Get-GceImage "my-old-image" -Project "my-project"

PS C:\\> $image2 = Get-GceImage "my-new-image" -Project "my-project"

PS C:\\> Disable-GceImage $image1 -State OBSOLETE -Replacement $image2



Marks the image named "my-old-image" as obsolete, and sets "my-new-image" as its replacement.



RELATED LINKS

[Image resource definition] (https://cloud.google.com/compute/docs/r ... s#resource)