Class: Google::Apis::OsconfigV2::OsPolicyResourceFileResource
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV2::OsPolicyResourceFileResource
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/osconfig_v2/classes.rb,
lib/google/apis/osconfig_v2/representations.rb,
lib/google/apis/osconfig_v2/representations.rb
Overview
A resource that manages the state of a file.
Instance Attribute Summary collapse
-
#content ⇒ String
A file with this content.
-
#file ⇒ Google::Apis::OsconfigV2::OsPolicyResourceFile
A remote or local file.
-
#path ⇒ String
Required.
-
#permissions ⇒ String
Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility).
-
#state ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ OsPolicyResourceFileResource
constructor
A new instance of OsPolicyResourceFileResource.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ OsPolicyResourceFileResource
Returns a new instance of OsPolicyResourceFileResource.
1329 1330 1331 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 1329 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content ⇒ String
A file with this content. The size of the content is limited to 32KiB.
Corresponds to the JSON property content
1300 1301 1302 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 1300 def content @content end |
#file ⇒ Google::Apis::OsconfigV2::OsPolicyResourceFile
A remote or local file.
Corresponds to the JSON property file
1305 1306 1307 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 1305 def file @file end |
#path ⇒ String
Required. The absolute path of the file within the VM.
Corresponds to the JSON property path
1310 1311 1312 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 1310 def path @path end |
#permissions ⇒ String
Consists of three octal digits which represent, in order, the permissions of
the owner, group, and other users for the file (similarly to the numeric mode
used in the linux chmod utility). Each digit represents a three bit number
with the 4 bit corresponding to the read permissions, the 2 bit corresponds to
the write bit, and the one bit corresponds to the execute permission. Default
behavior is 755. Below are some examples of permissions and their associated
values: read, write, and execute: 7 read and execute: 5 read and write: 6 read
only: 4
Corresponds to the JSON property permissions
1322 1323 1324 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 1322 def @permissions end |
#state ⇒ String
Required. Desired state of the file.
Corresponds to the JSON property state
1327 1328 1329 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 1327 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1334 1335 1336 1337 1338 1339 1340 |
# File 'lib/google/apis/osconfig_v2/classes.rb', line 1334 def update!(**args) @content = args[:content] if args.key?(:content) @file = args[:file] if args.key?(:file) @path = args[:path] if args.key?(:path) @permissions = args[:permissions] if args.key?(:permissions) @state = args[:state] if args.key?(:state) end |