|
| 1 | +# Copyright 2024 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +name: ServiceInstance |
| 16 | +description: A service instance is an instance of the Dataproc operator running on a GDC cluster. |
| 17 | +references: |
| 18 | + guides: |
| 19 | + 'Dataproc Intro': 'https://cloud.google.com/dataproc/' |
| 20 | + api: 'https://cloud.google.com/dataproc-gdc/docs/reference/rest/v1/projects.locations.serviceInstances' |
| 21 | +base_url: projects/{{project}}/locations/{{location}}/serviceInstances |
| 22 | +create_url: projects/{{project}}/locations/{{location}}/serviceInstances?serviceInstanceId={{service_instance_id}} |
| 23 | +self_link: projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}} |
| 24 | +id_format: projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}} |
| 25 | +import_format: |
| 26 | + - projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}} |
| 27 | +autogen_async: true |
| 28 | +parameters: |
| 29 | + - name: location |
| 30 | + type: String |
| 31 | + description: 'Location of the resource. ' |
| 32 | + url_param_only: true |
| 33 | + required: true |
| 34 | + immutable: true |
| 35 | + - name: serviceInstanceId |
| 36 | + type: String |
| 37 | + description: "Id of the service instance." |
| 38 | + url_param_only: true |
| 39 | + required: true |
| 40 | + immutable: true |
| 41 | +async: |
| 42 | + actions: ['create', 'delete'] |
| 43 | + type: OpAsync |
| 44 | + operation: |
| 45 | + base_url: "{{op_id}}" |
| 46 | +immutable: true |
| 47 | +examples: |
| 48 | + - name: "dataprocgdc_serviceinstance" |
| 49 | + primary_resource_id: "service-instance" |
| 50 | + vars: |
| 51 | + service_instance_id: "tf-e2e-service-instance" |
| 52 | + project: "my-project" |
| 53 | + test_vars_overrides: |
| 54 | + 'project': '"gdce-cluster-monitoring"' |
| 55 | +properties: |
| 56 | + - name: gdceCluster |
| 57 | + type: NestedObject |
| 58 | + properties: |
| 59 | + - name: gdceCluster |
| 60 | + type: String |
| 61 | + description: 'Gdce cluster resource id. ' |
| 62 | + required: true |
| 63 | + description: 'Gdce cluster information. ' |
| 64 | + - name: name |
| 65 | + type: String |
| 66 | + description: 'Identifier. The name of the service instance. ' |
| 67 | + output: true |
| 68 | + - name: uid |
| 69 | + type: String |
| 70 | + description: "System generated unique identifier for this service instance, |
| 71 | + formatted as UUID4. " |
| 72 | + output: true |
| 73 | + - name: displayName |
| 74 | + type: String |
| 75 | + description: 'User-provided human-readable name to be used in user interfaces. ' |
| 76 | + - name: createTime |
| 77 | + type: String |
| 78 | + description: 'The timestamp when the resource was created. ' |
| 79 | + output: true |
| 80 | + - name: updateTime |
| 81 | + type: String |
| 82 | + description: 'The timestamp when the resource was most recently updated. ' |
| 83 | + output: true |
| 84 | + - name: requestedState |
| 85 | + type: String |
| 86 | + description: | |
| 87 | + The intended state to which the service instance is reconciling. Possible values: |
| 88 | + * `CREATING` |
| 89 | + * `ACTIVE` |
| 90 | + * `DISCONNECTED` |
| 91 | + * `DELETING` |
| 92 | + * `STOPPING` |
| 93 | + * `STOPPED` |
| 94 | + * `STARTING` |
| 95 | + * `UPDATING` |
| 96 | + * `FAILED` |
| 97 | + output: true |
| 98 | + - name: state |
| 99 | + type: String |
| 100 | + description: | |
| 101 | + The current state. Possible values: |
| 102 | + * `CREATING` |
| 103 | + * `ACTIVE` |
| 104 | + * `DISCONNECTED` |
| 105 | + * `DELETING` |
| 106 | + * `STOPPING` |
| 107 | + * `STOPPED` |
| 108 | + * `STARTING` |
| 109 | + * `UPDATING` |
| 110 | + * `FAILED` |
| 111 | + output: true |
| 112 | + - name: reconciling |
| 113 | + type: Boolean |
| 114 | + description: "Whether the service instance is currently reconciling. True |
| 115 | + if the current state of the resource does not match the intended state, and the |
| 116 | + system is working to reconcile them, whether or not the change was user initiated." |
| 117 | + output: true |
| 118 | + - name: labels |
| 119 | + type: KeyValueLabels |
| 120 | + description: "The labels to associate with this service instance. Labels |
| 121 | + may be used for filtering and billing tracking. " |
| 122 | + - name: sparkServiceInstanceConfig |
| 123 | + type: NestedObject |
| 124 | + properties: [] |
| 125 | + description: 'Spark-specific service instance configuration. ' |
| 126 | + - name: stateMessage |
| 127 | + type: String |
| 128 | + description: 'A message explaining the current state. ' |
| 129 | + output: true |
| 130 | + - name: serviceAccount |
| 131 | + type: String |
| 132 | + description: 'Requested service account to associate with ServiceInstance. ' |
| 133 | + - name: effectiveServiceAccount |
| 134 | + type: String |
| 135 | + description: "Effective service account associated with ServiceInstance. |
| 136 | + This will be the service_account if specified. Otherwise, it will be an automatically created |
| 137 | + per-resource P4SA that also automatically has Fleet Workload. Identity bindings |
| 138 | + applied. " |
| 139 | + output: true |
0 commit comments