oci.UsageProxy.SubscriptionRedeemableUser
Explore with Pulumi AI
This resource provides the Subscription Redeemable User resource in Oracle Cloud Infrastructure Usage Proxy service.
Adds the list of redeemable user summary for a subscription ID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSubscriptionRedeemableUser = new oci.usageproxy.SubscriptionRedeemableUser("test_subscription_redeemable_user", {
subscriptionId: testSubscription.id,
tenancyId: testTenancy.id,
items: [{
emailId: testEmail.id,
firstName: subscriptionRedeemableUserItemsFirstName,
lastName: subscriptionRedeemableUserItemsLastName,
}],
userId: testUser.id,
});
import pulumi
import pulumi_oci as oci
test_subscription_redeemable_user = oci.usage_proxy.SubscriptionRedeemableUser("test_subscription_redeemable_user",
subscription_id=test_subscription["id"],
tenancy_id=test_tenancy["id"],
items=[{
"email_id": test_email["id"],
"first_name": subscription_redeemable_user_items_first_name,
"last_name": subscription_redeemable_user_items_last_name,
}],
user_id=test_user["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/UsageProxy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := UsageProxy.NewSubscriptionRedeemableUser(ctx, "test_subscription_redeemable_user", &UsageProxy.SubscriptionRedeemableUserArgs{
SubscriptionId: pulumi.Any(testSubscription.Id),
TenancyId: pulumi.Any(testTenancy.Id),
Items: usageproxy.SubscriptionRedeemableUserItemArray{
&usageproxy.SubscriptionRedeemableUserItemArgs{
EmailId: pulumi.Any(testEmail.Id),
FirstName: pulumi.Any(subscriptionRedeemableUserItemsFirstName),
LastName: pulumi.Any(subscriptionRedeemableUserItemsLastName),
},
},
UserId: pulumi.Any(testUser.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 testSubscriptionRedeemableUser = new Oci.UsageProxy.SubscriptionRedeemableUser("test_subscription_redeemable_user", new()
{
SubscriptionId = testSubscription.Id,
TenancyId = testTenancy.Id,
Items = new[]
{
new Oci.UsageProxy.Inputs.SubscriptionRedeemableUserItemArgs
{
EmailId = testEmail.Id,
FirstName = subscriptionRedeemableUserItemsFirstName,
LastName = subscriptionRedeemableUserItemsLastName,
},
},
UserId = testUser.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.UsageProxy.SubscriptionRedeemableUser;
import com.pulumi.oci.UsageProxy.SubscriptionRedeemableUserArgs;
import com.pulumi.oci.UsageProxy.inputs.SubscriptionRedeemableUserItemArgs;
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 testSubscriptionRedeemableUser = new SubscriptionRedeemableUser("testSubscriptionRedeemableUser", SubscriptionRedeemableUserArgs.builder()
.subscriptionId(testSubscription.id())
.tenancyId(testTenancy.id())
.items(SubscriptionRedeemableUserItemArgs.builder()
.emailId(testEmail.id())
.firstName(subscriptionRedeemableUserItemsFirstName)
.lastName(subscriptionRedeemableUserItemsLastName)
.build())
.userId(testUser.id())
.build());
}
}
resources:
testSubscriptionRedeemableUser:
type: oci:UsageProxy:SubscriptionRedeemableUser
name: test_subscription_redeemable_user
properties:
subscriptionId: ${testSubscription.id}
tenancyId: ${testTenancy.id}
items:
- emailId: ${testEmail.id}
firstName: ${subscriptionRedeemableUserItemsFirstName}
lastName: ${subscriptionRedeemableUserItemsLastName}
userId: ${testUser.id}
Create SubscriptionRedeemableUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SubscriptionRedeemableUser(name: string, args: SubscriptionRedeemableUserArgs, opts?: CustomResourceOptions);
@overload
def SubscriptionRedeemableUser(resource_name: str,
args: SubscriptionRedeemableUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SubscriptionRedeemableUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
items: Optional[Sequence[_usageproxy.SubscriptionRedeemableUserItemArgs]] = None,
subscription_id: Optional[str] = None,
tenancy_id: Optional[str] = None,
user_id: Optional[str] = None)
func NewSubscriptionRedeemableUser(ctx *Context, name string, args SubscriptionRedeemableUserArgs, opts ...ResourceOption) (*SubscriptionRedeemableUser, error)
public SubscriptionRedeemableUser(string name, SubscriptionRedeemableUserArgs args, CustomResourceOptions? opts = null)
public SubscriptionRedeemableUser(String name, SubscriptionRedeemableUserArgs args)
public SubscriptionRedeemableUser(String name, SubscriptionRedeemableUserArgs args, CustomResourceOptions options)
type: oci:UsageProxy:SubscriptionRedeemableUser
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 SubscriptionRedeemableUserArgs
- 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 SubscriptionRedeemableUserArgs
- 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 SubscriptionRedeemableUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionRedeemableUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubscriptionRedeemableUserArgs
- 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 subscriptionRedeemableUserResource = new Oci.UsageProxy.SubscriptionRedeemableUser("subscriptionRedeemableUserResource", new()
{
Items = new[]
{
new Oci.UsageProxy.Inputs.SubscriptionRedeemableUserItemArgs
{
EmailId = "string",
FirstName = "string",
LastName = "string",
},
},
SubscriptionId = "string",
TenancyId = "string",
UserId = "string",
});
example, err := UsageProxy.NewSubscriptionRedeemableUser(ctx, "subscriptionRedeemableUserResource", &UsageProxy.SubscriptionRedeemableUserArgs{
Items: usageproxy.SubscriptionRedeemableUserItemArray{
&usageproxy.SubscriptionRedeemableUserItemArgs{
EmailId: pulumi.String("string"),
FirstName: pulumi.String("string"),
LastName: pulumi.String("string"),
},
},
SubscriptionId: pulumi.String("string"),
TenancyId: pulumi.String("string"),
UserId: pulumi.String("string"),
})
var subscriptionRedeemableUserResource = new SubscriptionRedeemableUser("subscriptionRedeemableUserResource", SubscriptionRedeemableUserArgs.builder()
.items(SubscriptionRedeemableUserItemArgs.builder()
.emailId("string")
.firstName("string")
.lastName("string")
.build())
.subscriptionId("string")
.tenancyId("string")
.userId("string")
.build());
subscription_redeemable_user_resource = oci.usage_proxy.SubscriptionRedeemableUser("subscriptionRedeemableUserResource",
items=[oci.usage_proxy.SubscriptionRedeemableUserItemArgs(
email_id="string",
first_name="string",
last_name="string",
)],
subscription_id="string",
tenancy_id="string",
user_id="string")
const subscriptionRedeemableUserResource = new oci.usageproxy.SubscriptionRedeemableUser("subscriptionRedeemableUserResource", {
items: [{
emailId: "string",
firstName: "string",
lastName: "string",
}],
subscriptionId: "string",
tenancyId: "string",
userId: "string",
});
type: oci:UsageProxy:SubscriptionRedeemableUser
properties:
items:
- emailId: string
firstName: string
lastName: string
subscriptionId: string
tenancyId: string
userId: string
SubscriptionRedeemableUser Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SubscriptionRedeemableUser resource accepts the following input properties:
- Items
List<Subscription
Redeemable User Item> - The list of new user to be added to the list of user that can redeem rewards.
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- User
Id string The user ID of the person to send a copy of an email.
** 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
- Items
[]Subscription
Redeemable User Item Args - The list of new user to be added to the list of user that can redeem rewards.
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- User
Id string The user ID of the person to send a copy of an email.
** 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
- items
List<Subscription
Redeemable User Item> - The list of new user to be added to the list of user that can redeem rewards.
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- user
Id String The user ID of the person to send a copy of an email.
** 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
- items
Subscription
Redeemable User Item[] - The list of new user to be added to the list of user that can redeem rewards.
- subscription
Id string - The subscription ID for which rewards information is requested for.
- tenancy
Id string - The OCID of the tenancy.
- user
Id string The user ID of the person to send a copy of an email.
** 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
- items
Sequence[usageproxy.
Subscription Redeemable User Item Args] - The list of new user to be added to the list of user that can redeem rewards.
- subscription_
id str - The subscription ID for which rewards information is requested for.
- tenancy_
id str - The OCID of the tenancy.
- user_
id str The user ID of the person to send a copy of an email.
** 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
- items List<Property Map>
- The list of new user to be added to the list of user that can redeem rewards.
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- user
Id String The user ID of the person to send a copy of an email.
** 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
Outputs
All input properties are implicitly available as output properties. Additionally, the SubscriptionRedeemableUser resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SubscriptionRedeemableUser Resource
Get an existing SubscriptionRedeemableUser 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?: SubscriptionRedeemableUserState, opts?: CustomResourceOptions): SubscriptionRedeemableUser
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
items: Optional[Sequence[_usageproxy.SubscriptionRedeemableUserItemArgs]] = None,
subscription_id: Optional[str] = None,
tenancy_id: Optional[str] = None,
user_id: Optional[str] = None) -> SubscriptionRedeemableUser
func GetSubscriptionRedeemableUser(ctx *Context, name string, id IDInput, state *SubscriptionRedeemableUserState, opts ...ResourceOption) (*SubscriptionRedeemableUser, error)
public static SubscriptionRedeemableUser Get(string name, Input<string> id, SubscriptionRedeemableUserState? state, CustomResourceOptions? opts = null)
public static SubscriptionRedeemableUser get(String name, Output<String> id, SubscriptionRedeemableUserState 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.
- Items
List<Subscription
Redeemable User Item> - The list of new user to be added to the list of user that can redeem rewards.
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- User
Id string The user ID of the person to send a copy of an email.
** 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
- Items
[]Subscription
Redeemable User Item Args - The list of new user to be added to the list of user that can redeem rewards.
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- User
Id string The user ID of the person to send a copy of an email.
** 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
- items
List<Subscription
Redeemable User Item> - The list of new user to be added to the list of user that can redeem rewards.
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- user
Id String The user ID of the person to send a copy of an email.
** 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
- items
Subscription
Redeemable User Item[] - The list of new user to be added to the list of user that can redeem rewards.
- subscription
Id string - The subscription ID for which rewards information is requested for.
- tenancy
Id string - The OCID of the tenancy.
- user
Id string The user ID of the person to send a copy of an email.
** 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
- items
Sequence[usageproxy.
Subscription Redeemable User Item Args] - The list of new user to be added to the list of user that can redeem rewards.
- subscription_
id str - The subscription ID for which rewards information is requested for.
- tenancy_
id str - The OCID of the tenancy.
- user_
id str The user ID of the person to send a copy of an email.
** 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
- items List<Property Map>
- The list of new user to be added to the list of user that can redeem rewards.
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- user
Id String The user ID of the person to send a copy of an email.
** 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
SubscriptionRedeemableUserItem, SubscriptionRedeemableUserItemArgs
- email_
id str - The email ID for a user that can redeem rewards.
- first_
name str - The first name of the user that can redeem rewards.
- last_
name str - The last name of the user that can redeem rewards.
Import
SubscriptionRedeemableUsers can be imported using the id
, e.g.
$ pulumi import oci:UsageProxy/subscriptionRedeemableUser:SubscriptionRedeemableUser test_subscription_redeemable_user "subscriptions/{subscriptionId}/redeemableUsers/tenancyId/{tenancyId}"
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.