Reference documentation and code samples for the Google Cloud Database Center V1beta Client class DatabaseResource.
DatabaseResource represents every individually configured database unit representing compute and/or storage.
NextId: 20
Generated from protobuf message google.cloud.databasecenter.v1beta.DatabaseResource
Namespace
Google \ Cloud \ DatabaseCenter \ V1betaMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ child_resources |
array<DatabaseResource>
List of children associated with a database group. |
↳ full_resource_name |
string
The full resource name, based on CAIS resource name format https://cloud.google.com/asset-inventory/docs/resource-name-format Example: |
↳ container |
string
Specifies where the resource is created. For GCP, it is the full name of the project. |
↳ product |
Product
The product this resource represents. |
↳ location |
string
The location of the resources. It supports returning only regional locations in GCP. These are of the form: "us-central1", "us-east1", etc. See https://cloud.google.com/about/locations for a list of such regions. |
↳ labels |
array<Label>
Labels applied on the resource. The requirements for labels assigned to Google Cloud resources may be found at https://cloud.google.com/resource-manager/docs/labels-overview#requirements |
↳ tags |
array<Tag>
Tags applied on the resource. The requirements for tags assigned to Google Cloud resources may be found at https://cloud.google.com/resource-manager/docs/tags/tags-overview |
↳ resource_type |
string
The type of resource defined according to the pattern: {Service Name}/{Type}. Ex: sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance spanner.googleapis.com/Instance |
↳ sub_resource_type |
int
Subtype of the resource specified at creation time. |
↳ machine_config |
MachineConfig
Machine configuration like CPU, memory, etc for the resource. |
↳ signal_groups |
array<SignalGroup>
The list of signal groups and count of issues related to the resource. Only those signals which have been requested would be included. |
↳ metrics |
Metrics
Observable metrics for the resource e.g. CPU utilization, memory utilization, etc. |
↳ resource_category |
int
The category of the resource. |
↳ resource_name |
string
The name of the resource(The last part of the full resource name). Example: For full resource name - |
↳ backupdr_config |
BackupDRConfig
Optional. Backup and disaster recovery details for the resource. |
↳ edition |
int
The edition of the resource. |
↳ maintenance_info |
MaintenanceInfo
Optional. The maintenance information of the resource. |
getChildResources
List of children associated with a database group.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setChildResources
List of children associated with a database group.
| Parameter | |
|---|---|
| Name | Description |
var |
array<DatabaseResource>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFullResourceName
The full resource name, based on CAIS resource name format
https://cloud.google.com/asset-inventory/docs/resource-name-format
Example:
//cloudsql.googleapis.com/projects/project-number/instances/mysql-1
//cloudsql.googleapis.com/projects/project-number/instances/postgres-1
//spanner.googleapis.com/projects/project-number/instances/spanner-instance-1
//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1
//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1/instances/i1
| Returns | |
|---|---|
| Type | Description |
string |
|
setFullResourceName
The full resource name, based on CAIS resource name format
https://cloud.google.com/asset-inventory/docs/resource-name-format
Example:
//cloudsql.googleapis.com/projects/project-number/instances/mysql-1
//cloudsql.googleapis.com/projects/project-number/instances/postgres-1
//spanner.googleapis.com/projects/project-number/instances/spanner-instance-1
//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1
//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1/instances/i1
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getContainer
Specifies where the resource is created. For GCP, it is the full name of the project.
| Returns | |
|---|---|
| Type | Description |
string |
|
setContainer
Specifies where the resource is created. For GCP, it is the full name of the project.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getProduct
The product this resource represents.
| Returns | |
|---|---|
| Type | Description |
Product|null |
|
hasProduct
clearProduct
setProduct
The product this resource represents.
| Parameter | |
|---|---|
| Name | Description |
var |
Product
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getLocation
The location of the resources. It supports returning only regional locations in GCP. These are of the form: "us-central1", "us-east1", etc.
See https://cloud.google.com/about/locations for a list of such regions.
| Returns | |
|---|---|
| Type | Description |
string |
|
setLocation
The location of the resources. It supports returning only regional locations in GCP. These are of the form: "us-central1", "us-east1", etc.
See https://cloud.google.com/about/locations for a list of such regions.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getLabels
Labels applied on the resource. The requirements for labels assigned to Google Cloud resources may be found at https://cloud.google.com/resource-manager/docs/labels-overview#requirements
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setLabels
Labels applied on the resource. The requirements for labels assigned to Google Cloud resources may be found at https://cloud.google.com/resource-manager/docs/labels-overview#requirements
| Parameter | |
|---|---|
| Name | Description |
var |
array<Label>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTags
Tags applied on the resource. The requirements for tags assigned to Google Cloud resources may be found at https://cloud.google.com/resource-manager/docs/tags/tags-overview
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setTags
Tags applied on the resource. The requirements for tags assigned to Google Cloud resources may be found at https://cloud.google.com/resource-manager/docs/tags/tags-overview
| Parameter | |
|---|---|
| Name | Description |
var |
array<Tag>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getResourceType
The type of resource defined according to the pattern: {Service Name}/{Type}. Ex: sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance spanner.googleapis.com/Instance
| Returns | |
|---|---|
| Type | Description |
string |
|
setResourceType
The type of resource defined according to the pattern: {Service Name}/{Type}. Ex: sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance spanner.googleapis.com/Instance
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSubResourceType
Subtype of the resource specified at creation time.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type SubResourceType. |
setSubResourceType
Subtype of the resource specified at creation time.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type SubResourceType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMachineConfig
Machine configuration like CPU, memory, etc for the resource.
| Returns | |
|---|---|
| Type | Description |
MachineConfig|null |
|
hasMachineConfig
clearMachineConfig
setMachineConfig
Machine configuration like CPU, memory, etc for the resource.
| Parameter | |
|---|---|
| Name | Description |
var |
MachineConfig
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSignalGroups
The list of signal groups and count of issues related to the resource.
Only those signals which have been requested would be included.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setSignalGroups
The list of signal groups and count of issues related to the resource.
Only those signals which have been requested would be included.
| Parameter | |
|---|---|
| Name | Description |
var |
array<SignalGroup>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMetrics
Observable metrics for the resource e.g. CPU utilization, memory utilization, etc.
| Returns | |
|---|---|
| Type | Description |
Metrics|null |
|
hasMetrics
clearMetrics
setMetrics
Observable metrics for the resource e.g. CPU utilization, memory utilization, etc.
| Parameter | |
|---|---|
| Name | Description |
var |
Metrics
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getResourceCategory
The category of the resource.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type ResourceCategory. |
setResourceCategory
The category of the resource.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type ResourceCategory. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getResourceName
The name of the resource(The last part of the full resource name).
Example:
For full resource name -
//cloudsql.googleapis.com/projects/project-number/instances/mysql-1,
resource name - mysql-1
For full resource name -
//cloudsql.googleapis.com/projects/project-number/instances/postgres-1 ,
resource name - postgres-1
Note: In some cases, there might be more than one resource with the same
resource name.
| Returns | |
|---|---|
| Type | Description |
string |
|
setResourceName
The name of the resource(The last part of the full resource name).
Example:
For full resource name -
//cloudsql.googleapis.com/projects/project-number/instances/mysql-1,
resource name - mysql-1
For full resource name -
//cloudsql.googleapis.com/projects/project-number/instances/postgres-1 ,
resource name - postgres-1
Note: In some cases, there might be more than one resource with the same
resource name.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getBackupdrConfig
Optional. Backup and disaster recovery details for the resource.
| Returns | |
|---|---|
| Type | Description |
BackupDRConfig|null |
|
hasBackupdrConfig
clearBackupdrConfig
setBackupdrConfig
Optional. Backup and disaster recovery details for the resource.
| Parameter | |
|---|---|
| Name | Description |
var |
BackupDRConfig
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEdition
The edition of the resource.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type Edition. |
setEdition
The edition of the resource.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type Edition. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMaintenanceInfo
Optional. The maintenance information of the resource.
| Returns | |
|---|---|
| Type | Description |
MaintenanceInfo|null |
|
hasMaintenanceInfo
clearMaintenanceInfo
setMaintenanceInfo
Optional. The maintenance information of the resource.
| Parameter | |
|---|---|
| Name | Description |
var |
MaintenanceInfo
|
| Returns | |
|---|---|
| Type | Description |
$this |
|