Class: Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/osconfig/v1/os_policy.rb

Overview

A resource that manages the state of a file.

Defined Under Namespace

Modules: DesiredState

Instance Attribute Summary collapse

Instance Attribute Details

#content::String

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

Note: The following fields are mutually exclusive: content, file. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::String)

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

    Note: The following fields are mutually exclusive: content, file. If a field in that set is populated, all other fields in the set will automatically be cleared.



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'proto_docs/google/cloud/osconfig/v1/os_policy.rb', line 569

class FileResource
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Desired state of the file.
  module DesiredState
    # Unspecified is invalid.
    DESIRED_STATE_UNSPECIFIED = 0

    # Ensure file at path is present.
    PRESENT = 1

    # Ensure file at path is absent.
    ABSENT = 2

    # Ensure the contents of the file at path matches. If the file does
    # not exist it will be created.
    CONTENTS_MATCH = 3
  end
end

#file::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File

Returns A remote or local source.

Note: The following fields are mutually exclusive: file, content. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'proto_docs/google/cloud/osconfig/v1/os_policy.rb', line 569

class FileResource
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Desired state of the file.
  module DesiredState
    # Unspecified is invalid.
    DESIRED_STATE_UNSPECIFIED = 0

    # Ensure file at path is present.
    PRESENT = 1

    # Ensure file at path is absent.
    ABSENT = 2

    # Ensure the contents of the file at path matches. If the file does
    # not exist it will be created.
    CONTENTS_MATCH = 3
  end
end

#path::String

Returns Required. The absolute path of the file within the VM.

Returns:

  • (::String)

    Required. The absolute path of the file within the VM.



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'proto_docs/google/cloud/osconfig/v1/os_policy.rb', line 569

class FileResource
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Desired state of the file.
  module DesiredState
    # Unspecified is invalid.
    DESIRED_STATE_UNSPECIFIED = 0

    # Ensure file at path is present.
    PRESENT = 1

    # Ensure file at path is absent.
    ABSENT = 2

    # Ensure the contents of the file at path matches. If the file does
    # not exist it will be created.
    CONTENTS_MATCH = 3
  end
end

#permissions::String

Returns 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.

Returns:

  • (::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



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'proto_docs/google/cloud/osconfig/v1/os_policy.rb', line 569

class FileResource
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Desired state of the file.
  module DesiredState
    # Unspecified is invalid.
    DESIRED_STATE_UNSPECIFIED = 0

    # Ensure file at path is present.
    PRESENT = 1

    # Ensure file at path is absent.
    ABSENT = 2

    # Ensure the contents of the file at path matches. If the file does
    # not exist it will be created.
    CONTENTS_MATCH = 3
  end
end

#state::Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource::DesiredState

Returns Required. Desired state of the file.

Returns:



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'proto_docs/google/cloud/osconfig/v1/os_policy.rb', line 569

class FileResource
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Desired state of the file.
  module DesiredState
    # Unspecified is invalid.
    DESIRED_STATE_UNSPECIFIED = 0

    # Ensure file at path is present.
    PRESENT = 1

    # Ensure file at path is absent.
    ABSENT = 2

    # Ensure the contents of the file at path matches. If the file does
    # not exist it will be created.
    CONTENTS_MATCH = 3
  end
end