email_recipients_groups
Creates, updates, deletes, gets or lists an email_recipients_groups resource.
Overview​
| Name | email_recipients_groups |
| Type | Resource |
| Id | oci.usage.email_recipients_groups |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The saved email recipients group.
| Name | Datatype | Description |
|---|---|---|
id | string | The usage statement email recipients group OCID. |
compartmentId | string | The customer tenancy OCID. |
lifecycleState | string | The email recipients group lifecycle state. (ACTIVE, INACTIVE) |
recipientsList | array | The list of recipients that will receive usage statement emails. |
The usage statement email recipients group list.
| Name | Datatype | Description |
|---|---|---|
id | string | The usage statement email recipients group OCID. |
compartmentId | string | The customer tenancy. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"foo-namespace": {"bar-key": "value"}} |
freeformTags | object | Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"bar-key": "value"} |
lifecycleState | string | The email recipients group lifecycle state. (x-obmcs-enumref: #/definitions/EmailRecipientsGroup/lifecycleState) |
recipientsList | array | The list of recipients that will receive usage statement emails. |
systemTags | object | Usage of system tag keys. These predefined keys are scoped to namespaces. See [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"orcl-cloud": {"free-tier-retained": "true"}} |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | emailRecipientsGroupId, subscriptionId, compartmentId, region | opc-request-id | Returns the saved usage statement email recipients group.<br /> |
list | select | subscriptionId, compartmentId, region | opc-request-id, limit, page, opc-retry-token, sortBy, sortOrder | Returns the saved usage statement email recipients group.<br /> |
create | insert | subscriptionId, region, compartmentId, recipientsList | opc-request-id, opc-retry-token | Creates a list of email recipients that can receive usage statements for the subscription.<br /> |
update | update | emailRecipientsGroupId, subscriptionId, compartmentId, region, recipientsList | opc-request-id, if-match | Updates a saved email recipients group.<br /> |
delete | delete | emailRecipientsGroupId, subscriptionId, compartmentId, region | opc-request-id, if-match | Deletes the email recipients group for the usage statement subscription.<br /> |
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 |
|---|---|---|
compartmentId | string | The compartment ID in which to list resources. |
emailRecipientsGroupId | string | The email recipients group OCID. |
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) |
subscriptionId | string | The usage statement subscription unique OCID. |
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 | The maximum number of items to return. |
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 that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. |
page | string | The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. |
sortBy | string | The field to sort by. If not specified, the default is displayName. |
sortOrder | string | The sort order to use, whether 'asc' or 'desc'. |
SELECT examples​
- get
- list
Returns the saved usage statement email recipients group.<br />
SELECT
id,
compartmentId,
lifecycleState,
recipientsList
FROM oci.usage.email_recipients_groups
WHERE emailRecipientsGroupId = '{{ emailRecipientsGroupId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Returns the saved usage statement email recipients group.<br />
SELECT
id,
compartmentId,
definedTags,
freeformTags,
lifecycleState,
recipientsList,
systemTags
FROM oci.usage.email_recipients_groups
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND opc-retry-token = '{{ opc-retry-token }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
;
INSERT examples​
- create
- Manifest
Creates a list of email recipients that can receive usage statements for the subscription.<br />
INSERT INTO oci.usage.email_recipients_groups (
compartmentId,
recipientsList,
subscriptionId,
region,
opc-request-id,
opc-retry-token
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ recipientsList }}' /* required */,
'{{ subscriptionId }}',
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
lifecycleState,
recipientsList
;
# Description fields are for documentation purposes
- name: email_recipients_groups
props:
- name: subscriptionId
value: "{{ subscriptionId }}"
description: Required parameter for the email_recipients_groups resource.
- name: region
value: "{{ region }}"
description: Required parameter for the email_recipients_groups resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The customer tenancy.
- name: recipientsList
description: |
The list of recipients that will receive usage statement emails.
value:
- emailId: "{{ emailId }}"
firstName: "{{ firstName }}"
lastName: "{{ lastName }}"
lifecycleState: "{{ lifecycleState }}"
- 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.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
UPDATE examples​
- update
Updates a saved email recipients group.<br />
UPDATE oci.usage.email_recipients_groups
SET
recipientsList = '{{ recipientsList }}'
WHERE
emailRecipientsGroupId = '{{ emailRecipientsGroupId }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND compartmentId = '{{ compartmentId }}' --required
AND region = '{{ region }}' --required
AND recipientsList = '{{ recipientsList }}' --required
AND opc-request-id = '{{ opc-request-id}}'
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
lifecycleState,
recipientsList;
DELETE examples​
- delete
Deletes the email recipients group for the usage statement subscription.<br />
DELETE FROM oci.usage.email_recipients_groups
WHERE emailRecipientsGroupId = '{{ emailRecipientsGroupId }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND compartmentId = '{{ compartmentId }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
AND if-match = '{{ if-match }}'
;