Class: Google::Apis::OsconfigV1alpha::OsPolicyResourceFileResource

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/osconfig_v1alpha/classes.rb,
lib/google/apis/osconfig_v1alpha/representations.rb,
lib/google/apis/osconfig_v1alpha/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.



1983
1984
1985
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1983

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

Instance Attribute Details

#contentString

A a file with this content. The size of the content is limited to 1024 characters. Corresponds to the JSON property content

Returns:

  • (String)


1954
1955
1956
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1954

def content
  @content
end

#fileGoogle::Apis::OsconfigV1alpha::OsPolicyResourceFile

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



1959
1960
1961
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1959

def file
  @file
end

#pathString

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

Returns:

  • (String)


1964
1965
1966
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1964

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)


1976
1977
1978
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1976

def permissions
  @permissions
end

#stateString

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

Returns:

  • (String)


1981
1982
1983
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1981

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1988
1989
1990
1991
1992
1993
1994
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1988

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