Compute V1 Client - Class InstancesSetSecurityPolicyRequest (1.14.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
NameDescription
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
TypeDescription
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
NameDescription
var string[]
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this