Google Cloud Container V1 Client - Class SetMaintenancePolicyRequest (1.18.0)

Reference documentation and code samples for the Google Cloud Container V1 Client class SetMaintenancePolicyRequest.

SetMaintenancePolicyRequest sets the maintenance policy for a cluster.

Generated from protobuf message google.container.v1.SetMaintenancePolicyRequest

Namespace

Google \ Cloud \ Container \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ project_id string

Required. The Google Developers Console project ID or project number.

↳ zone string

Required. The name of the Google Compute Engine zone in which the cluster resides.

↳ cluster_id string

Required. The name of the cluster to update.

↳ maintenance_policy Google\Cloud\Container\V1\MaintenancePolicy

Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.

↳ name string

The name (project, location, cluster name) of the cluster to set maintenance policy. Specified in the format projects/*/locations/*/clusters/*.

getProjectId

Required. The Google Developers Console project ID or project number.

Returns
TypeDescription
string

setProjectId

Required. The Google Developers Console project ID or project number.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getZone

Required. The name of the Google Compute Engine zone in which the cluster resides.

Returns
TypeDescription
string

setZone

Required. The name of the Google Compute Engine zone in which the cluster resides.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getClusterId

Required. The name of the cluster to update.

Returns
TypeDescription
string

setClusterId

Required. The name of the cluster to update.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMaintenancePolicy

Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.

Returns
TypeDescription
Google\Cloud\Container\V1\MaintenancePolicy|null

hasMaintenancePolicy

clearMaintenancePolicy

setMaintenancePolicy

Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.

Parameter
NameDescription
var Google\Cloud\Container\V1\MaintenancePolicy
Returns
TypeDescription
$this

getName

The name (project, location, cluster name) of the cluster to set maintenance policy.

Specified in the format projects/*/locations/*/clusters/*.

Returns
TypeDescription
string

setName

The name (project, location, cluster name) of the cluster to set maintenance policy.

Specified in the format projects/*/locations/*/clusters/*.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

static::build

Parameters
NameDescription
projectId string

Required. The Google Developers Console project ID or project number.

zone string

Required. The name of the Google Compute Engine zone in which the cluster resides.

clusterId string

Required. The name of the cluster to update.

maintenancePolicy Google\Cloud\Container\V1\MaintenancePolicy

Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.

Returns
TypeDescription
Google\Cloud\Container\V1\SetMaintenancePolicyRequest

static::buildFromNameMaintenancePolicy

Parameters
NameDescription
name string

The name (project, location, cluster name) of the cluster to set maintenance policy. Specified in the format projects/*/locations/*/clusters/*.

maintenancePolicy Google\Cloud\Container\V1\MaintenancePolicy

Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy.

Returns
TypeDescription
Google\Cloud\Container\V1\SetMaintenancePolicyRequest