Google Cloud Binary Authorization V1 Client - Class Policy (1.1.1) Stay organized with collections Save and categorize content based on your preferences.
Reference documentation and code samples for the Google Cloud Binary Authorization V1 Client class Policy.
Apolicy for container image binary authorization.
Generated from protobuf messagegoogle.cloud.binaryauthorization.v1.Policy
Namespace
Google \ Cloud \ BinaryAuthorization \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data | arrayOptional. Data for populating the Message object. |
↳ name | stringOutput only. The resource name, in the format |
↳ description | stringOptional. A descriptive comment. |
↳ global_policy_evaluation_mode | intOptional. Controls the evaluation of a Google-maintained global admission policy for common system-level images. Images not covered by the global policy will be subject to the project admission policy. This setting has no effect when specified inside a global admission policy. |
↳ admission_whitelist_patterns | array<AdmissionWhitelistPattern>Optional. Admission policy allowlisting. A matching admission request will always be permitted. This feature is typically used to exclude Google or third-party infrastructure images from Binary Authorization policies. |
↳ cluster_admission_rules | array|Google\Protobuf\Internal\MapFieldOptional. Per-cluster admission rules. Cluster spec format: |
↳ kubernetes_namespace_admission_rules | array|Google\Protobuf\Internal\MapFieldOptional. Per-kubernetes-namespace admission rules. K8s namespace spec format: [a-z.-]+, e.g. 'some-namespace' |
↳ kubernetes_service_account_admission_rules | array|Google\Protobuf\Internal\MapFieldOptional. Per-kubernetes-service-account admission rules. Service account spec format: |
↳ istio_service_identity_admission_rules | array|Google\Protobuf\Internal\MapFieldOptional. Per-istio-service-identity admission rules. Istio service identity spec format: spiffe:// |
↳ default_admission_rule | AdmissionRuleRequired. Default admission rule for a cluster without a per-cluster, per- kubernetes-service-account, or per-istio-service-identity admission rule. |
↳ update_time | Google\Protobuf\TimestampOutput only. Time when the policy was last updated. |
getName
Output only. The resource name, in the formatprojects/*/policy. There isat most one policy per project.
| Returns | |
|---|---|
| Type | Description |
string | |
setName
Output only. The resource name, in the formatprojects/*/policy. There isat most one policy per project.
| Parameter | |
|---|---|
| Name | Description |
var | string |
| Returns | |
|---|---|
| Type | Description |
$this | |
getDescription
Optional. A descriptive comment.
| Returns | |
|---|---|
| Type | Description |
string | |
setDescription
Optional. A descriptive comment.
| Parameter | |
|---|---|
| Name | Description |
var | string |
| Returns | |
|---|---|
| Type | Description |
$this | |
getGlobalPolicyEvaluationMode
Optional. Controls the evaluation of a Google-maintained global admissionpolicy for common system-level images. Images not covered by the globalpolicy will be subject to the project admission policy. This settinghas no effect when specified inside a global admission policy.
| Returns | |
|---|---|
| Type | Description |
int | Enum of typeGlobalPolicyEvaluationMode. |
setGlobalPolicyEvaluationMode
Optional. Controls the evaluation of a Google-maintained global admissionpolicy for common system-level images. Images not covered by the globalpolicy will be subject to the project admission policy. This settinghas no effect when specified inside a global admission policy.
| Parameter | |
|---|---|
| Name | Description |
var | intEnum of typeGlobalPolicyEvaluationMode. |
| Returns | |
|---|---|
| Type | Description |
$this | |
getAdmissionWhitelistPatterns
Optional. Admission policy allowlisting. A matching admission request willalways be permitted. This feature is typically used to exclude Google orthird-party infrastructure images from Binary Authorization policies.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField | |
setAdmissionWhitelistPatterns
Optional. Admission policy allowlisting. A matching admission request willalways be permitted. This feature is typically used to exclude Google orthird-party infrastructure images from Binary Authorization policies.
| Parameter | |
|---|---|
| Name | Description |
var | array<AdmissionWhitelistPattern> |
| Returns | |
|---|---|
| Type | Description |
$this | |
getClusterAdmissionRules
Optional. Per-cluster admission rules. Cluster spec format:location.clusterId. There can be at most one admission rule per clusterspec.
Alocation is either a compute zone (e.g. us-central1-a) or a region(e.g. us-central1).ForclusterId syntax restrictions seehttps://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField | |
setClusterAdmissionRules
Optional. Per-cluster admission rules. Cluster spec format:location.clusterId. There can be at most one admission rule per clusterspec.
Alocation is either a compute zone (e.g. us-central1-a) or a region(e.g. us-central1).ForclusterId syntax restrictions seehttps://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
| Parameter | |
|---|---|
| Name | Description |
var | array|Google\Protobuf\Internal\MapField |
| Returns | |
|---|---|
| Type | Description |
$this | |
getKubernetesNamespaceAdmissionRules
Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:[a-z.-]+, e.g. 'some-namespace'
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField | |
setKubernetesNamespaceAdmissionRules
Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:[a-z.-]+, e.g. 'some-namespace'
| Parameter | |
|---|---|
| Name | Description |
var | array|Google\Protobuf\Internal\MapField |
| Returns | |
|---|---|
| Type | Description |
$this | |
getKubernetesServiceAccountAdmissionRules
Optional. Per-kubernetes-service-account admission rules. Service accountspec format:namespace:serviceaccount. e.g. 'test-ns:default'
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField | |
setKubernetesServiceAccountAdmissionRules
Optional. Per-kubernetes-service-account admission rules. Service accountspec format:namespace:serviceaccount. e.g. 'test-ns:default'
| Parameter | |
|---|---|
| Name | Description |
var | array|Google\Protobuf\Internal\MapField |
| Returns | |
|---|---|
| Type | Description |
$this | |
getIstioServiceIdentityAdmissionRules
Optional. Per-istio-service-identity admission rules. Istio serviceidentity spec format:spiffe://
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField | |
setIstioServiceIdentityAdmissionRules
Optional. Per-istio-service-identity admission rules. Istio serviceidentity spec format:spiffe://
| Parameter | |
|---|---|
| Name | Description |
var | array|Google\Protobuf\Internal\MapField |
| Returns | |
|---|---|
| Type | Description |
$this | |
getDefaultAdmissionRule
Required. Default admission rule for a cluster without a per-cluster, per-kubernetes-service-account, or per-istio-service-identity admission rule.
| Returns | |
|---|---|
| Type | Description |
AdmissionRule|null | |
hasDefaultAdmissionRule
clearDefaultAdmissionRule
setDefaultAdmissionRule
Required. Default admission rule for a cluster without a per-cluster, per-kubernetes-service-account, or per-istio-service-identity admission rule.
| Parameter | |
|---|---|
| Name | Description |
var | AdmissionRule |
| Returns | |
|---|---|
| Type | Description |
$this | |
getUpdateTime
Output only. Time when the policy was last updated.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null | |
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. Time when the policy was last updated.
| Parameter | |
|---|---|
| Name | Description |
var | Google\Protobuf\Timestamp |
| Returns | |
|---|---|
| Type | Description |
$this | |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.