oci.MeteringComputation.UsageStatementEmailRecipientsGroup
Explore with Pulumi AI
This resource provides the Usage Statement Email Recipients Group resource in Oracle Cloud Infrastructure Metering Computation service.
Add a list of email recipients that can receive usage statements for the subscription.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testUsageStatementEmailRecipientsGroup = new oci.meteringcomputation.UsageStatementEmailRecipientsGroup("test_usage_statement_email_recipients_group", {
    compartmentId: compartmentId,
    recipientsLists: [{
        emailId: testEmail.id,
        state: usageStatementEmailRecipientsGroupRecipientsListState,
        firstName: usageStatementEmailRecipientsGroupRecipientsListFirstName,
        lastName: usageStatementEmailRecipientsGroupRecipientsListLastName,
    }],
    subscriptionId: testSubscription.id,
});
import pulumi
import pulumi_oci as oci
test_usage_statement_email_recipients_group = oci.metering_computation.UsageStatementEmailRecipientsGroup("test_usage_statement_email_recipients_group",
    compartment_id=compartment_id,
    recipients_lists=[{
        "email_id": test_email["id"],
        "state": usage_statement_email_recipients_group_recipients_list_state,
        "first_name": usage_statement_email_recipients_group_recipients_list_first_name,
        "last_name": usage_statement_email_recipients_group_recipients_list_last_name,
    }],
    subscription_id=test_subscription["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/meteringcomputation"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := meteringcomputation.NewUsageStatementEmailRecipientsGroup(ctx, "test_usage_statement_email_recipients_group", &meteringcomputation.UsageStatementEmailRecipientsGroupArgs{
			CompartmentId: pulumi.Any(compartmentId),
			RecipientsLists: meteringcomputation.UsageStatementEmailRecipientsGroupRecipientsListArray{
				&meteringcomputation.UsageStatementEmailRecipientsGroupRecipientsListArgs{
					EmailId:   pulumi.Any(testEmail.Id),
					State:     pulumi.Any(usageStatementEmailRecipientsGroupRecipientsListState),
					FirstName: pulumi.Any(usageStatementEmailRecipientsGroupRecipientsListFirstName),
					LastName:  pulumi.Any(usageStatementEmailRecipientsGroupRecipientsListLastName),
				},
			},
			SubscriptionId: pulumi.Any(testSubscription.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testUsageStatementEmailRecipientsGroup = new Oci.MeteringComputation.UsageStatementEmailRecipientsGroup("test_usage_statement_email_recipients_group", new()
    {
        CompartmentId = compartmentId,
        RecipientsLists = new[]
        {
            new Oci.MeteringComputation.Inputs.UsageStatementEmailRecipientsGroupRecipientsListArgs
            {
                EmailId = testEmail.Id,
                State = usageStatementEmailRecipientsGroupRecipientsListState,
                FirstName = usageStatementEmailRecipientsGroupRecipientsListFirstName,
                LastName = usageStatementEmailRecipientsGroupRecipientsListLastName,
            },
        },
        SubscriptionId = testSubscription.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.MeteringComputation.UsageStatementEmailRecipientsGroup;
import com.pulumi.oci.MeteringComputation.UsageStatementEmailRecipientsGroupArgs;
import com.pulumi.oci.MeteringComputation.inputs.UsageStatementEmailRecipientsGroupRecipientsListArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var testUsageStatementEmailRecipientsGroup = new UsageStatementEmailRecipientsGroup("testUsageStatementEmailRecipientsGroup", UsageStatementEmailRecipientsGroupArgs.builder()
            .compartmentId(compartmentId)
            .recipientsLists(UsageStatementEmailRecipientsGroupRecipientsListArgs.builder()
                .emailId(testEmail.id())
                .state(usageStatementEmailRecipientsGroupRecipientsListState)
                .firstName(usageStatementEmailRecipientsGroupRecipientsListFirstName)
                .lastName(usageStatementEmailRecipientsGroupRecipientsListLastName)
                .build())
            .subscriptionId(testSubscription.id())
            .build());
    }
}
resources:
  testUsageStatementEmailRecipientsGroup:
    type: oci:MeteringComputation:UsageStatementEmailRecipientsGroup
    name: test_usage_statement_email_recipients_group
    properties:
      compartmentId: ${compartmentId}
      recipientsLists:
        - emailId: ${testEmail.id}
          state: ${usageStatementEmailRecipientsGroupRecipientsListState}
          firstName: ${usageStatementEmailRecipientsGroupRecipientsListFirstName}
          lastName: ${usageStatementEmailRecipientsGroupRecipientsListLastName}
      subscriptionId: ${testSubscription.id}
Create UsageStatementEmailRecipientsGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UsageStatementEmailRecipientsGroup(name: string, args: UsageStatementEmailRecipientsGroupArgs, opts?: CustomResourceOptions);@overload
def UsageStatementEmailRecipientsGroup(resource_name: str,
                                       args: UsageStatementEmailRecipientsGroupArgs,
                                       opts: Optional[ResourceOptions] = None)
@overload
def UsageStatementEmailRecipientsGroup(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       compartment_id: Optional[str] = None,
                                       recipients_lists: Optional[Sequence[_meteringcomputation.UsageStatementEmailRecipientsGroupRecipientsListArgs]] = None,
                                       subscription_id: Optional[str] = None,
                                       email_recipients_group_id: Optional[str] = None)func NewUsageStatementEmailRecipientsGroup(ctx *Context, name string, args UsageStatementEmailRecipientsGroupArgs, opts ...ResourceOption) (*UsageStatementEmailRecipientsGroup, error)public UsageStatementEmailRecipientsGroup(string name, UsageStatementEmailRecipientsGroupArgs args, CustomResourceOptions? opts = null)
public UsageStatementEmailRecipientsGroup(String name, UsageStatementEmailRecipientsGroupArgs args)
public UsageStatementEmailRecipientsGroup(String name, UsageStatementEmailRecipientsGroupArgs args, CustomResourceOptions options)
type: oci:MeteringComputation:UsageStatementEmailRecipientsGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args UsageStatementEmailRecipientsGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args UsageStatementEmailRecipientsGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args UsageStatementEmailRecipientsGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UsageStatementEmailRecipientsGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UsageStatementEmailRecipientsGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var usageStatementEmailRecipientsGroupResource = new Oci.MeteringComputation.UsageStatementEmailRecipientsGroup("usageStatementEmailRecipientsGroupResource", new()
{
    CompartmentId = "string",
    RecipientsLists = new[]
    {
        new Oci.MeteringComputation.Inputs.UsageStatementEmailRecipientsGroupRecipientsListArgs
        {
            EmailId = "string",
            State = "string",
            FirstName = "string",
            LastName = "string",
        },
    },
    SubscriptionId = "string",
    EmailRecipientsGroupId = "string",
});
example, err := MeteringComputation.NewUsageStatementEmailRecipientsGroup(ctx, "usageStatementEmailRecipientsGroupResource", &MeteringComputation.UsageStatementEmailRecipientsGroupArgs{
	CompartmentId: pulumi.String("string"),
	RecipientsLists: meteringcomputation.UsageStatementEmailRecipientsGroupRecipientsListArray{
		&meteringcomputation.UsageStatementEmailRecipientsGroupRecipientsListArgs{
			EmailId:   pulumi.String("string"),
			State:     pulumi.String("string"),
			FirstName: pulumi.String("string"),
			LastName:  pulumi.String("string"),
		},
	},
	SubscriptionId:         pulumi.String("string"),
	EmailRecipientsGroupId: pulumi.String("string"),
})
var usageStatementEmailRecipientsGroupResource = new UsageStatementEmailRecipientsGroup("usageStatementEmailRecipientsGroupResource", UsageStatementEmailRecipientsGroupArgs.builder()
    .compartmentId("string")
    .recipientsLists(UsageStatementEmailRecipientsGroupRecipientsListArgs.builder()
        .emailId("string")
        .state("string")
        .firstName("string")
        .lastName("string")
        .build())
    .subscriptionId("string")
    .emailRecipientsGroupId("string")
    .build());
usage_statement_email_recipients_group_resource = oci.metering_computation.UsageStatementEmailRecipientsGroup("usageStatementEmailRecipientsGroupResource",
    compartment_id="string",
    recipients_lists=[{
        "email_id": "string",
        "state": "string",
        "first_name": "string",
        "last_name": "string",
    }],
    subscription_id="string",
    email_recipients_group_id="string")
const usageStatementEmailRecipientsGroupResource = new oci.meteringcomputation.UsageStatementEmailRecipientsGroup("usageStatementEmailRecipientsGroupResource", {
    compartmentId: "string",
    recipientsLists: [{
        emailId: "string",
        state: "string",
        firstName: "string",
        lastName: "string",
    }],
    subscriptionId: "string",
    emailRecipientsGroupId: "string",
});
type: oci:MeteringComputation:UsageStatementEmailRecipientsGroup
properties:
    compartmentId: string
    emailRecipientsGroupId: string
    recipientsLists:
        - emailId: string
          firstName: string
          lastName: string
          state: string
    subscriptionId: string
UsageStatementEmailRecipientsGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The UsageStatementEmailRecipientsGroup resource accepts the following input properties:
- CompartmentId string
- (Updatable) The customer tenancy.
- RecipientsLists List<UsageStatement Email Recipients Group Recipients List> 
- (Updatable) The list of recipient will receive the usage statement email.
- SubscriptionId string
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- EmailRecipients stringGroup Id 
- CompartmentId string
- (Updatable) The customer tenancy.
- RecipientsLists []UsageStatement Email Recipients Group Recipients List Args 
- (Updatable) The list of recipient will receive the usage statement email.
- SubscriptionId string
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- EmailRecipients stringGroup Id 
- compartmentId String
- (Updatable) The customer tenancy.
- recipientsLists List<UsageStatement Email Recipients Group Recipients List> 
- (Updatable) The list of recipient will receive the usage statement email.
- subscriptionId String
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- emailRecipients StringGroup Id 
- compartmentId string
- (Updatable) The customer tenancy.
- recipientsLists UsageStatement Email Recipients Group Recipients List[] 
- (Updatable) The list of recipient will receive the usage statement email.
- subscriptionId string
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- emailRecipients stringGroup Id 
- compartment_id str
- (Updatable) The customer tenancy.
- recipients_lists Sequence[meteringcomputation.Usage Statement Email Recipients Group Recipients List Args] 
- (Updatable) The list of recipient will receive the usage statement email.
- subscription_id str
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- email_recipients_ strgroup_ id 
- compartmentId String
- (Updatable) The customer tenancy.
- recipientsLists List<Property Map>
- (Updatable) The list of recipient will receive the usage statement email.
- subscriptionId String
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- emailRecipients StringGroup Id 
Outputs
All input properties are implicitly available as output properties. Additionally, the UsageStatementEmailRecipientsGroup resource produces the following output properties:
Look up Existing UsageStatementEmailRecipientsGroup Resource
Get an existing UsageStatementEmailRecipientsGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: UsageStatementEmailRecipientsGroupState, opts?: CustomResourceOptions): UsageStatementEmailRecipientsGroup@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        email_recipients_group_id: Optional[str] = None,
        recipients_lists: Optional[Sequence[_meteringcomputation.UsageStatementEmailRecipientsGroupRecipientsListArgs]] = None,
        state: Optional[str] = None,
        subscription_id: Optional[str] = None) -> UsageStatementEmailRecipientsGroupfunc GetUsageStatementEmailRecipientsGroup(ctx *Context, name string, id IDInput, state *UsageStatementEmailRecipientsGroupState, opts ...ResourceOption) (*UsageStatementEmailRecipientsGroup, error)public static UsageStatementEmailRecipientsGroup Get(string name, Input<string> id, UsageStatementEmailRecipientsGroupState? state, CustomResourceOptions? opts = null)public static UsageStatementEmailRecipientsGroup get(String name, Output<String> id, UsageStatementEmailRecipientsGroupState state, CustomResourceOptions options)resources:  _:    type: oci:MeteringComputation:UsageStatementEmailRecipientsGroup    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- CompartmentId string
- (Updatable) The customer tenancy.
- EmailRecipients stringGroup Id 
- RecipientsLists List<UsageStatement Email Recipients Group Recipients List> 
- (Updatable) The list of recipient will receive the usage statement email.
- State string
- The email recipient group lifecycle state.
- SubscriptionId string
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- CompartmentId string
- (Updatable) The customer tenancy.
- EmailRecipients stringGroup Id 
- RecipientsLists []UsageStatement Email Recipients Group Recipients List Args 
- (Updatable) The list of recipient will receive the usage statement email.
- State string
- The email recipient group lifecycle state.
- SubscriptionId string
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- compartmentId String
- (Updatable) The customer tenancy.
- emailRecipients StringGroup Id 
- recipientsLists List<UsageStatement Email Recipients Group Recipients List> 
- (Updatable) The list of recipient will receive the usage statement email.
- state String
- The email recipient group lifecycle state.
- subscriptionId String
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- compartmentId string
- (Updatable) The customer tenancy.
- emailRecipients stringGroup Id 
- recipientsLists UsageStatement Email Recipients Group Recipients List[] 
- (Updatable) The list of recipient will receive the usage statement email.
- state string
- The email recipient group lifecycle state.
- subscriptionId string
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- compartment_id str
- (Updatable) The customer tenancy.
- email_recipients_ strgroup_ id 
- recipients_lists Sequence[meteringcomputation.Usage Statement Email Recipients Group Recipients List Args] 
- (Updatable) The list of recipient will receive the usage statement email.
- state str
- The email recipient group lifecycle state.
- subscription_id str
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
- compartmentId String
- (Updatable) The customer tenancy.
- emailRecipients StringGroup Id 
- recipientsLists List<Property Map>
- (Updatable) The list of recipient will receive the usage statement email.
- state String
- The email recipient group lifecycle state.
- subscriptionId String
- The UsageStatement Subscription unique OCID. - ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values 
Supporting Types
UsageStatementEmailRecipientsGroupRecipientsList, UsageStatementEmailRecipientsGroupRecipientsListArgs              
- email_id str
- (Updatable) the email of the recipient.
- state str
- (Updatable) The email recipient lifecycle state.
- first_name str
- (Updatable) the first name of the recipient.
- last_name str
- (Updatable) the last name of the recipient.
Import
UsageStatementEmailRecipientsGroups can be imported using the id, e.g.
$ pulumi import oci:MeteringComputation/usageStatementEmailRecipientsGroup:UsageStatementEmailRecipientsGroup test_usage_statement_email_recipients_group "usageStatements/{subscriptionId}/emailRecipientsGroups/{emailRecipientsGroupId}/compartmentId/{compartmentId}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.