workload_mappings
Creates, updates, deletes, gets or lists a workload_mappings resource.
Overview​
| Name | workload_mappings |
| Type | Resource |
| Id | oci.container_engine.workload_mappings |
Fields​
The following fields are returned by SELECT queries:
- get
- list
WorkloadMapping details.
| Name | Datatype | Description |
|---|---|---|
id | string | The ocid of the workloadMapping. (example: ocid1.workloadmapping.ocX.us-ashburn-1.xtrdsa56sjasa72321) |
clusterId | string | The OCID of the cluster. (example: ocid1.cluster.oc1.iad.aaaaaaaaga3tombrmq3wgyrvmi3gcn3bmfsdizjwgy4wgyldmy3dcmtcmmyw) |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The state of the workloadMapping. (CREATING, ACTIVE, FAILED, DELETING, DELETED, UPDATING) (example: UPDATING, x-obmcs-top-level-enum: #/definitions/WorkloadMappingLifecycleState) |
mappedCompartmentId | string | The OCID of the mapped customer compartment. (example: ocid1.compartment.oc1..aaaaaaaafqm2df7ckwmmbtdsl2bgxsw4fcpvkoojytxrqst24yww2tdmtqcq) |
mappedTenancyId | string | The OCID of the mapped customer tenancy. (example: ocid1.tenancy.oc1..aaaaaaaafqm2df7ckwmmbtdsl2bgxsw4fcpvkoojytxrqst24yww2tdmtqcq) |
namespace | string | The namespace of the workloadMapping. (example: kube-proxy) |
systemTags | object | Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud": {"free-tier-retained": "true"}} |
timeCreated | string (date-time) | The time the cluster was created. (example: 2017-07-21T16:11:29Z) |
The properties that define an workloadMapping summary.
| Name | Datatype | Description |
|---|---|---|
id | string | The ocid of the workloadMapping. (example: ocid1.workloadmapping.ocX.us-ashburn-1.xtrdsa56sjasa72321) |
clusterId | string | The OCID of the cluster. (example: ocid1.cluster.oc1.iad.aaaaaaaaga3tombrmq3wgyrvmi3gcn3bmfsdizjwgy4wgyldmy3dcmtcmmyw) |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
lifecycleState | string | The state of the workloadMapping. (CREATING, ACTIVE, FAILED, DELETING, DELETED, UPDATING) (example: UPDATING, x-obmcs-top-level-enum: #/definitions/WorkloadMappingLifecycleState) |
mappedCompartmentId | string | The OCID of the mapped customer compartment. (example: ocid1.compartment.oc1..aaaaaaaafqm2df7ckwmmbtdsl2bgxsw4fcpvkoojytxrqst24yww2tdmtqcq) |
mappedTenancyId | string | The OCID of the mapped customer tenancy. (example: ocid1.tenancy.oc1..aaaaaaaafqm2df7ckwmmbtdsl2bgxsw4fcpvkoojytxrqst24yww2tdmtqcq) |
namespace | string | The namespace of the workloadMapping. (example: kube-proxy) |
systemTags | object | Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud": {"free-tier-retained": "true"}} |
timeCreated | string (date-time) | The time the cluster was created. (example: 2017-07-21T16:11:29Z) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | clusterId, workloadMappingId, region | opc-request-id | Get the specified workloadMapping for a cluster. |
list | select | clusterId, region | opc-request-id, limit, page, sortOrder, sortBy | List workloadMappings for a provisioned cluster. |
create | insert | clusterId, region, namespace, mappedCompartmentId | opc-retry-token, opc-request-id | Create the specified workloadMapping for a cluster. |
update | update | clusterId, workloadMappingId, region | if-match, opc-request-id | Update workloadMapping details for a cluster. |
delete | delete | clusterId, workloadMappingId, region | if-match, opc-request-id | Delete workloadMapping for a provisioned cluster. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
clusterId | string | The OCID of the cluster. |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
workloadMappingId | string | The OCID of the workloadMapping. |
if-match | string | For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. |
limit | integer | For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
opc-request-id | string | Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
opc-retry-token | string | A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. |
page | string | For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
sortBy | string | The optional field to sort the results by. |
sortOrder | string | The optional order in which to sort the results. |
SELECT examples​
- get
- list
Get the specified workloadMapping for a cluster.
SELECT
id,
clusterId,
definedTags,
freeformTags,
lifecycleState,
mappedCompartmentId,
mappedTenancyId,
namespace,
systemTags,
timeCreated
FROM oci.container_engine.workload_mappings
WHERE clusterId = '{{ clusterId }}' -- required
AND workloadMappingId = '{{ workloadMappingId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
List workloadMappings for a provisioned cluster.
SELECT
id,
clusterId,
definedTags,
freeformTags,
lifecycleState,
mappedCompartmentId,
mappedTenancyId,
namespace,
systemTags,
timeCreated
FROM oci.container_engine.workload_mappings
WHERE clusterId = '{{ clusterId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND sortOrder = '{{ sortOrder }}'
AND sortBy = '{{ sortBy }}'
;
INSERT examples​
- create
- Manifest
Create the specified workloadMapping for a cluster.
INSERT INTO oci.container_engine.workload_mappings (
definedTags,
freeformTags,
mappedCompartmentId,
namespace,
clusterId,
region,
opc-retry-token,
opc-request-id
)
SELECT
'{{ definedTags }}',
'{{ freeformTags }}',
'{{ mappedCompartmentId }}' /* required */,
'{{ namespace }}' /* required */,
'{{ clusterId }}',
'{{ region }}',
'{{ opc-retry-token }}',
'{{ opc-request-id }}'
RETURNING
id,
clusterId,
definedTags,
freeformTags,
lifecycleState,
mappedCompartmentId,
mappedTenancyId,
namespace,
systemTags,
timeCreated
;
# Description fields are for documentation purposes
- name: workload_mappings
props:
- name: clusterId
value: "{{ clusterId }}"
description: Required parameter for the workload_mappings resource.
- name: region
value: "{{ region }}"
description: Required parameter for the workload_mappings resource.
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined tags for this resource. Each key is predefined and scoped to a namespace.
For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
Example: `{"Operations": {"CostCenter": "42"}}`
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
- name: mappedCompartmentId
value: "{{ mappedCompartmentId }}"
description: |
The OCID of the mapped customer compartment.
- name: namespace
value: "{{ namespace }}"
description: |
The namespace of the workloadMapping.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours.
description: A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours.
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
UPDATE examples​
- update
Update workloadMapping details for a cluster.
UPDATE oci.container_engine.workload_mappings
SET
definedTags = '{{ definedTags }}',
freeformTags = '{{ freeformTags }}',
mappedCompartmentId = '{{ mappedCompartmentId }}'
WHERE
clusterId = '{{ clusterId }}' --required
AND workloadMappingId = '{{ workloadMappingId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
clusterId,
definedTags,
freeformTags,
lifecycleState,
mappedCompartmentId,
mappedTenancyId,
namespace,
systemTags,
timeCreated;
DELETE examples​
- delete
Delete workloadMapping for a provisioned cluster.
DELETE FROM oci.container_engine.workload_mappings
WHERE clusterId = '{{ clusterId }}' --required
AND workloadMappingId = '{{ workloadMappingId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;