1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. MeteringComputation
  5. UsageStatementEmailRecipientsGroup
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.MeteringComputation.UsageStatementEmailRecipientsGroup

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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<UsageStatementEmailRecipientsGroupRecipientsList>
    (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

    EmailRecipientsGroupId string
    CompartmentId string
    (Updatable) The customer tenancy.
    RecipientsLists []UsageStatementEmailRecipientsGroupRecipientsListArgs
    (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

    EmailRecipientsGroupId string
    compartmentId String
    (Updatable) The customer tenancy.
    recipientsLists List<UsageStatementEmailRecipientsGroupRecipientsList>
    (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

    emailRecipientsGroupId String
    compartmentId string
    (Updatable) The customer tenancy.
    recipientsLists UsageStatementEmailRecipientsGroupRecipientsList[]
    (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

    emailRecipientsGroupId string
    compartment_id str
    (Updatable) The customer tenancy.
    recipients_lists Sequence[meteringcomputation.UsageStatementEmailRecipientsGroupRecipientsListArgs]
    (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_group_id str
    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

    emailRecipientsGroupId String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UsageStatementEmailRecipientsGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The email recipient group lifecycle state.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The email recipient group lifecycle state.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The email recipient group lifecycle state.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The email recipient group lifecycle state.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The email recipient group lifecycle state.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The email recipient group lifecycle state.

    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) -> UsageStatementEmailRecipientsGroup
    func 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    CompartmentId string
    (Updatable) The customer tenancy.
    EmailRecipientsGroupId string
    RecipientsLists List<UsageStatementEmailRecipientsGroupRecipientsList>
    (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.
    EmailRecipientsGroupId string
    RecipientsLists []UsageStatementEmailRecipientsGroupRecipientsListArgs
    (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.
    emailRecipientsGroupId String
    recipientsLists List<UsageStatementEmailRecipientsGroupRecipientsList>
    (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.
    emailRecipientsGroupId string
    recipientsLists UsageStatementEmailRecipientsGroupRecipientsList[]
    (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_group_id str
    recipients_lists Sequence[meteringcomputation.UsageStatementEmailRecipientsGroupRecipientsListArgs]
    (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.
    emailRecipientsGroupId String
    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

    EmailId string
    (Updatable) the email of the recipient.
    State string
    (Updatable) The email recipient lifecycle state.
    FirstName string
    (Updatable) the first name of the recipient.
    LastName string
    (Updatable) the last name of the recipient.
    EmailId string
    (Updatable) the email of the recipient.
    State string
    (Updatable) The email recipient lifecycle state.
    FirstName string
    (Updatable) the first name of the recipient.
    LastName string
    (Updatable) the last name of the recipient.
    emailId String
    (Updatable) the email of the recipient.
    state String
    (Updatable) The email recipient lifecycle state.
    firstName String
    (Updatable) the first name of the recipient.
    lastName String
    (Updatable) the last name of the recipient.
    emailId string
    (Updatable) the email of the recipient.
    state string
    (Updatable) The email recipient lifecycle state.
    firstName string
    (Updatable) the first name of the recipient.
    lastName string
    (Updatable) the last name of the recipient.
    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.
    emailId String
    (Updatable) the email of the recipient.
    state String
    (Updatable) The email recipient lifecycle state.
    firstName String
    (Updatable) the first name of the recipient.
    lastName String
    (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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi