편집

다음을 통해 공유


Get-AzAksMaintenanceConfiguration

Gets the specified maintenance configuration of a managed cluster.

Syntax

Get-AzAksMaintenanceConfiguration
   -ResourceGroupName <String>
   -ResourceName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzAksMaintenanceConfiguration
   -ConfigName <String>
   -ResourceGroupName <String>
   -ResourceName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzAksMaintenanceConfiguration
   -InputObject <IAksIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

Gets the specified maintenance configuration of a managed cluster.

Examples

Example 1: List all maintenance configurations for a managed cluster

Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster

Name
----
aks_maintenance_config1
aks_maintenance_config2

List all maintenance configurations for a managed cluster "myCluster".

Example 2: Get a maintenance configuration with its config name

Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config'

Name
----
aks_maintenance_config1

Get a maintenance configuration with name "aks_maintenance_config" for a managed cluster "myCluster".

Example 3: Get a maintenance configuration via identity

$TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 1) -End (Get-Date -Year 2023 -Month 3 -Day 2)
$TimeInWeek = New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2
$MaintenanceConfig = New-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan
$MaintenanceConfig | Get-AzAksMaintenanceConfiguration

Name
----
aks_maintenance_config

Get a maintenance configuration via identity for a managed cluster "myCluster".

Parameters

-ConfigName

The name of the maintenance configuration.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IAksIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceName

The name of the managed cluster resource.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IAksIdentity

Outputs

IMaintenanceConfiguration