Class: Google::Apis::OsconfigV1::OsPolicyResourceFileResource

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/osconfig_v1/classes.rb,
lib/google/apis/osconfig_v1/representations.rb,
lib/google/apis/osconfig_v1/representations.rb

Overview

A resource that manages the state of a file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OsPolicyResourceFileResource

Returns a new instance of OsPolicyResourceFileResource.



2220
2221
2222
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2220

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#contentString

A file with this content. The size of the content is limited to 32KiB. Corresponds to the JSON property content

Returns:

  • (String)


2191
2192
2193
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2191

def content
  @content
end

#fileGoogle::Apis::OsconfigV1::OsPolicyResourceFile

A remote or local file. Corresponds to the JSON property file



2196
2197
2198
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2196

def file
  @file
end

#pathString

Required. The absolute path of the file within the VM. Corresponds to the JSON property path

Returns:

  • (String)


2201
2202
2203
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2201

def path
  @path
end

#permissionsString

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

Returns:

  • (String)


2213
2214
2215
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2213

def permissions
  @permissions
end

#stateString

Required. Desired state of the file. Corresponds to the JSON property state

Returns:

  • (String)


2218
2219
2220
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2218

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2225
2226
2227
2228
2229
2230
2231
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2225

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