Class: Ansible::Ruby::Modules::Gcp_compute_disk

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb

Overview

Persistent disks are durable storage devices that function similarly to the physical disks in a desktop or a server. Compute Engine manages the hardware behind these devices to ensure data redundancy and optimize performance for you. Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD). Persistent disks are located independently from your virtual machine instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements. Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#descriptionObject?

Returns An optional description of this resource. Provide this property when you create the resource.

Returns:

  • (Object, nil)

    An optional description of this resource. Provide this property when you create the resource.



18
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 18

attribute :description

#disk_encryption_keyHash?

Returns Encrypts the disk using a customer-supplied encryption key.,After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine).,Customer-supplied encryption keys do not protect access to metadata of the disk.,If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.

Returns:

  • (Hash, nil)

    Encrypts the disk using a customer-supplied encryption key.,After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine).,Customer-supplied encryption keys do not protect access to metadata of the disk.,If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.



48
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 48

attribute :disk_encryption_key

#labelsObject?

Returns Labels to apply to this disk. A list of key->value pairs.

Returns:

  • (Object, nil)

    Labels to apply to this disk. A list of key->value pairs.



21
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 21

attribute :labels

#licensesObject?

Returns Any applicable publicly visible licenses.

Returns:

  • (Object, nil)

    Any applicable publicly visible licenses.



24
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 24

attribute :licenses

#nameString

Returns Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ‘[a-z](*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Returns:

  • (String)

    Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ‘[a-z](*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.



27
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 27

attribute :name

#size_gbInteger?

Returns Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.,If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot.

Returns:

  • (Integer, nil)

    Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.,If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot.



31
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 31

attribute :size_gb

#source_imageObject?

Returns The source image used to create this disk. If the source image is deleted, this field will not be set.,To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image: projects/debian-cloud/global/images/family/debian-8 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD To create a disk with a private image that you created, specify the image name in the following format: global/images/my-private-image You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-private-family .

Returns:

  • (Object, nil)

    The source image used to create this disk. If the source image is deleted, this field will not be set.,To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image: projects/debian-cloud/global/images/family/debian-8 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD To create a disk with a private image that you created, specify the image name in the following format: global/images/my-private-image You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-private-family .



38
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 38

attribute :source_image

#source_image_encryption_keyObject?

Returns The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.

Returns:

  • (Object, nil)

    The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.



45
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 45

attribute :source_image_encryption_key

#source_snapshotObject?

Returns The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: * ‘U(www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot`) * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot` .

Returns:



52
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 52

attribute :source_snapshot

#source_snapshot_encryption_keyObject?

Returns The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.

Returns:

  • (Object, nil)

    The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.



55
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 55

attribute :source_snapshot_encryption_key

#state:present, ...

Returns Whether the given object should exist in GCP.

Returns:

  • (:present, :absent, nil)

    Whether the given object should exist in GCP



14
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 14

attribute :state

#typeObject?

Returns URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.

Returns:

  • (Object, nil)

    URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.



35
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 35

attribute :type

#zoneString

Returns A reference to the zone where the disk resides.

Returns:

  • (String)

    A reference to the zone where the disk resides.



41
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_disk.rb', line 41

attribute :zone