Compute V1 Client - Class InstancesSetSecurityPolicyRequest (1.21.0)

Reference documentation and code samples for the Compute V1 Client class InstancesSetSecurityPolicyRequest.

Generated from protobuf message google.cloud.compute.v1.InstancesSetSecurityPolicyRequest

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ network_interfaces array

The network interfaces that the security policy will be applied to. Network interfaces use the nicN naming format. You can only set a security policy for network interfaces with an access config.

↳ security_policy string

A full or partial URL to a security policy to add to this instance. If this field is set to an empty string it will remove the associated security policy.

getNetworkInterfaces

The network interfaces that the security policy will be applied to. Network interfaces use the nicN naming format. You can only set a security policy for network interfaces with an access config.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setNetworkInterfaces

The network interfaces that the security policy will be applied to. Network interfaces use the nicN naming format. You can only set a security policy for network interfaces with an access config.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getSecurityPolicy

A full or partial URL to a security policy to add to this instance. If this field is set to an empty string it will remove the associated security policy.

Returns
Type Description
string

hasSecurityPolicy

clearSecurityPolicy

setSecurityPolicy

A full or partial URL to a security policy to add to this instance. If this field is set to an empty string it will remove the associated security policy.

Parameter
Name Description
var string
Returns
Type Description
$this