Class: Google::Apis::ClouddeployV1::DeployPolicy
- Inherits:
-
Object
- Object
- Google::Apis::ClouddeployV1::DeployPolicy
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/clouddeploy_v1/classes.rb,
lib/google/apis/clouddeploy_v1/representations.rb,
lib/google/apis/clouddeploy_v1/representations.rb
Overview
A DeployPolicy
resource in the Cloud Deploy API. A DeployPolicy
inhibits
manual or automation-driven actions within a Delivery Pipeline or Target.
Instance Attribute Summary collapse
-
#annotations ⇒ Hash<String,String>
User annotations.
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Description of the
DeployPolicy
. -
#etag ⇒ String
The weak etag of the
Automation
resource. -
#labels ⇒ Hash<String,String>
Labels are attributes that can be set and used by both the user and by Cloud Deploy.
-
#name ⇒ String
Output only.
-
#rules ⇒ Array<Google::Apis::ClouddeployV1::PolicyRule>
Required.
-
#selectors ⇒ Array<Google::Apis::ClouddeployV1::DeployPolicyResourceSelector>
Required.
-
#suspended ⇒ Boolean
(also: #suspended?)
When suspended, the policy will not prevent actions from occurring, even if the action violates the policy.
-
#uid ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DeployPolicy
constructor
A new instance of DeployPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DeployPolicy
Returns a new instance of DeployPolicy.
2034 2035 2036 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 2034 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annotations ⇒ Hash<String,String>
User annotations. These attributes can only be set and used by the user, and
not by Cloud Deploy. Annotations must meet the following constraints: *
Annotations are key/value pairs. * Valid annotation keys have two segments: an
optional prefix and name, separated by a slash (/
). * The name segment is
required and must be 63 characters or less, beginning and ending with an
alphanumeric character ([a-z0-9A-Z]
) with dashes (-
), underscores (_
),
dots (.
), and alphanumerics between. * The prefix is optional. If specified,
the prefix must be a DNS subdomain: a series of DNS labels separated by dots(.
), not longer than 253 characters in total, followed by a slash (/
). See
https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#
syntax-and-character-set for more details.
Corresponds to the JSON property annotations
1967 1968 1969 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1967 def annotations @annotations end |
#create_time ⇒ String
Output only. Time at which the deploy policy was created.
Corresponds to the JSON property createTime
1972 1973 1974 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1972 def create_time @create_time end |
#description ⇒ String
Description of the DeployPolicy
. Max length is 255 characters.
Corresponds to the JSON property description
1977 1978 1979 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1977 def description @description end |
#etag ⇒ String
The weak etag of the Automation
resource. This checksum is computed by the
server based on the value of other fields, and may be sent on update and
delete requests to ensure the client has an up-to-date value before proceeding.
Corresponds to the JSON property etag
1984 1985 1986 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1984 def etag @etag end |
#labels ⇒ Hash<String,String>
Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character.
- Each resource is limited to a maximum of 64 labels. Both keys and values are
additionally constrained to be <= 128 bytes.
Corresponds to the JSON property
labels
1995 1996 1997 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1995 def labels @labels end |
#name ⇒ String
Output only. Name of the DeployPolicy
. Format is projects/
project/
locations/
location/deployPolicies/
deployPolicy`. The
deployPolicy
component must match
a-z?
Corresponds to the JSON property
name`
2002 2003 2004 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 2002 def name @name end |
#rules ⇒ Array<Google::Apis::ClouddeployV1::PolicyRule>
Required. Rules to apply. At least one rule must be present.
Corresponds to the JSON property rules
2007 2008 2009 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 2007 def rules @rules end |
#selectors ⇒ Array<Google::Apis::ClouddeployV1::DeployPolicyResourceSelector>
Required. Selected resources to which the policy will be applied. At least one
selector is required. If one selector matches the resource the policy applies.
For example, if there are two selectors and the action being attempted matches
one of them, the policy will apply to that action.
Corresponds to the JSON property selectors
2015 2016 2017 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 2015 def selectors @selectors end |
#suspended ⇒ Boolean Also known as: suspended?
When suspended, the policy will not prevent actions from occurring, even if
the action violates the policy.
Corresponds to the JSON property suspended
2021 2022 2023 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 2021 def suspended @suspended end |
#uid ⇒ String
Output only. Unique identifier of the DeployPolicy
.
Corresponds to the JSON property uid
2027 2028 2029 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 2027 def uid @uid end |
#update_time ⇒ String
Output only. Most recent time at which the deploy policy was updated.
Corresponds to the JSON property updateTime
2032 2033 2034 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 2032 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 |
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 2039 def update!(**args) @annotations = args[:annotations] if args.key?(:annotations) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @rules = args[:rules] if args.key?(:rules) @selectors = args[:selectors] if args.key?(:selectors) @suspended = args[:suspended] if args.key?(:suspended) @uid = args[:uid] if args.key?(:uid) @update_time = args[:update_time] if args.key?(:update_time) end |