oci.ApiGateway.UsagePlan
Explore with Pulumi AI
This resource provides the Usage Plan resource in Oracle Cloud Infrastructure API Gateway service.
Creates a new usage plan.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testUsagePlan = new oci.apigateway.UsagePlan("test_usage_plan", {
    compartmentId: compartmentId,
    entitlements: [{
        name: usagePlanEntitlementsName,
        description: usagePlanEntitlementsDescription,
        quota: {
            operationOnBreach: usagePlanEntitlementsQuotaOperationOnBreach,
            resetPolicy: usagePlanEntitlementsQuotaResetPolicy,
            unit: usagePlanEntitlementsQuotaUnit,
            value: usagePlanEntitlementsQuotaValue,
        },
        rateLimit: {
            unit: usagePlanEntitlementsRateLimitUnit,
            value: usagePlanEntitlementsRateLimitValue,
        },
        targets: [{
            deploymentId: testDeployment.id,
        }],
    }],
    definedTags: {
        "Operations.CostCenter": "42",
    },
    displayName: usagePlanDisplayName,
    freeformTags: {
        Department: "Finance",
    },
});
import pulumi
import pulumi_oci as oci
test_usage_plan = oci.api_gateway.UsagePlan("test_usage_plan",
    compartment_id=compartment_id,
    entitlements=[{
        "name": usage_plan_entitlements_name,
        "description": usage_plan_entitlements_description,
        "quota": {
            "operation_on_breach": usage_plan_entitlements_quota_operation_on_breach,
            "reset_policy": usage_plan_entitlements_quota_reset_policy,
            "unit": usage_plan_entitlements_quota_unit,
            "value": usage_plan_entitlements_quota_value,
        },
        "rate_limit": {
            "unit": usage_plan_entitlements_rate_limit_unit,
            "value": usage_plan_entitlements_rate_limit_value,
        },
        "targets": [{
            "deployment_id": test_deployment["id"],
        }],
    }],
    defined_tags={
        "Operations.CostCenter": "42",
    },
    display_name=usage_plan_display_name,
    freeform_tags={
        "Department": "Finance",
    })
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apigateway.NewUsagePlan(ctx, "test_usage_plan", &apigateway.UsagePlanArgs{
			CompartmentId: pulumi.Any(compartmentId),
			Entitlements: apigateway.UsagePlanEntitlementArray{
				&apigateway.UsagePlanEntitlementArgs{
					Name:        pulumi.Any(usagePlanEntitlementsName),
					Description: pulumi.Any(usagePlanEntitlementsDescription),
					Quota: &apigateway.UsagePlanEntitlementQuotaArgs{
						OperationOnBreach: pulumi.Any(usagePlanEntitlementsQuotaOperationOnBreach),
						ResetPolicy:       pulumi.Any(usagePlanEntitlementsQuotaResetPolicy),
						Unit:              pulumi.Any(usagePlanEntitlementsQuotaUnit),
						Value:             pulumi.Any(usagePlanEntitlementsQuotaValue),
					},
					RateLimit: &apigateway.UsagePlanEntitlementRateLimitArgs{
						Unit:  pulumi.Any(usagePlanEntitlementsRateLimitUnit),
						Value: pulumi.Any(usagePlanEntitlementsRateLimitValue),
					},
					Targets: apigateway.UsagePlanEntitlementTargetArray{
						&apigateway.UsagePlanEntitlementTargetArgs{
							DeploymentId: pulumi.Any(testDeployment.Id),
						},
					},
				},
			},
			DefinedTags: pulumi.StringMap{
				"Operations.CostCenter": pulumi.String("42"),
			},
			DisplayName: pulumi.Any(usagePlanDisplayName),
			FreeformTags: pulumi.StringMap{
				"Department": pulumi.String("Finance"),
			},
		})
		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 testUsagePlan = new Oci.ApiGateway.UsagePlan("test_usage_plan", new()
    {
        CompartmentId = compartmentId,
        Entitlements = new[]
        {
            new Oci.ApiGateway.Inputs.UsagePlanEntitlementArgs
            {
                Name = usagePlanEntitlementsName,
                Description = usagePlanEntitlementsDescription,
                Quota = new Oci.ApiGateway.Inputs.UsagePlanEntitlementQuotaArgs
                {
                    OperationOnBreach = usagePlanEntitlementsQuotaOperationOnBreach,
                    ResetPolicy = usagePlanEntitlementsQuotaResetPolicy,
                    Unit = usagePlanEntitlementsQuotaUnit,
                    Value = usagePlanEntitlementsQuotaValue,
                },
                RateLimit = new Oci.ApiGateway.Inputs.UsagePlanEntitlementRateLimitArgs
                {
                    Unit = usagePlanEntitlementsRateLimitUnit,
                    Value = usagePlanEntitlementsRateLimitValue,
                },
                Targets = new[]
                {
                    new Oci.ApiGateway.Inputs.UsagePlanEntitlementTargetArgs
                    {
                        DeploymentId = testDeployment.Id,
                    },
                },
            },
        },
        DefinedTags = 
        {
            { "Operations.CostCenter", "42" },
        },
        DisplayName = usagePlanDisplayName,
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ApiGateway.UsagePlan;
import com.pulumi.oci.ApiGateway.UsagePlanArgs;
import com.pulumi.oci.ApiGateway.inputs.UsagePlanEntitlementArgs;
import com.pulumi.oci.ApiGateway.inputs.UsagePlanEntitlementQuotaArgs;
import com.pulumi.oci.ApiGateway.inputs.UsagePlanEntitlementRateLimitArgs;
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 testUsagePlan = new UsagePlan("testUsagePlan", UsagePlanArgs.builder()
            .compartmentId(compartmentId)
            .entitlements(UsagePlanEntitlementArgs.builder()
                .name(usagePlanEntitlementsName)
                .description(usagePlanEntitlementsDescription)
                .quota(UsagePlanEntitlementQuotaArgs.builder()
                    .operationOnBreach(usagePlanEntitlementsQuotaOperationOnBreach)
                    .resetPolicy(usagePlanEntitlementsQuotaResetPolicy)
                    .unit(usagePlanEntitlementsQuotaUnit)
                    .value(usagePlanEntitlementsQuotaValue)
                    .build())
                .rateLimit(UsagePlanEntitlementRateLimitArgs.builder()
                    .unit(usagePlanEntitlementsRateLimitUnit)
                    .value(usagePlanEntitlementsRateLimitValue)
                    .build())
                .targets(UsagePlanEntitlementTargetArgs.builder()
                    .deploymentId(testDeployment.id())
                    .build())
                .build())
            .definedTags(Map.of("Operations.CostCenter", "42"))
            .displayName(usagePlanDisplayName)
            .freeformTags(Map.of("Department", "Finance"))
            .build());
    }
}
resources:
  testUsagePlan:
    type: oci:ApiGateway:UsagePlan
    name: test_usage_plan
    properties:
      compartmentId: ${compartmentId}
      entitlements:
        - name: ${usagePlanEntitlementsName}
          description: ${usagePlanEntitlementsDescription}
          quota:
            operationOnBreach: ${usagePlanEntitlementsQuotaOperationOnBreach}
            resetPolicy: ${usagePlanEntitlementsQuotaResetPolicy}
            unit: ${usagePlanEntitlementsQuotaUnit}
            value: ${usagePlanEntitlementsQuotaValue}
          rateLimit:
            unit: ${usagePlanEntitlementsRateLimitUnit}
            value: ${usagePlanEntitlementsRateLimitValue}
          targets:
            - deploymentId: ${testDeployment.id}
      definedTags:
        Operations.CostCenter: '42'
      displayName: ${usagePlanDisplayName}
      freeformTags:
        Department: Finance
Create UsagePlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UsagePlan(name: string, args: UsagePlanArgs, opts?: CustomResourceOptions);@overload
def UsagePlan(resource_name: str,
              args: UsagePlanArgs,
              opts: Optional[ResourceOptions] = None)
@overload
def UsagePlan(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              compartment_id: Optional[str] = None,
              entitlements: Optional[Sequence[UsagePlanEntitlementArgs]] = None,
              defined_tags: Optional[Mapping[str, str]] = None,
              display_name: Optional[str] = None,
              freeform_tags: Optional[Mapping[str, str]] = None)func NewUsagePlan(ctx *Context, name string, args UsagePlanArgs, opts ...ResourceOption) (*UsagePlan, error)public UsagePlan(string name, UsagePlanArgs args, CustomResourceOptions? opts = null)
public UsagePlan(String name, UsagePlanArgs args)
public UsagePlan(String name, UsagePlanArgs args, CustomResourceOptions options)
type: oci:ApiGateway:UsagePlan
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 UsagePlanArgs
- 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 UsagePlanArgs
- 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 UsagePlanArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UsagePlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UsagePlanArgs
- 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 usagePlanResource = new Oci.ApiGateway.UsagePlan("usagePlanResource", new()
{
    CompartmentId = "string",
    Entitlements = new[]
    {
        new Oci.ApiGateway.Inputs.UsagePlanEntitlementArgs
        {
            Name = "string",
            Description = "string",
            Quota = new Oci.ApiGateway.Inputs.UsagePlanEntitlementQuotaArgs
            {
                OperationOnBreach = "string",
                ResetPolicy = "string",
                Unit = "string",
                Value = 0,
            },
            RateLimit = new Oci.ApiGateway.Inputs.UsagePlanEntitlementRateLimitArgs
            {
                Unit = "string",
                Value = 0,
            },
            Targets = new[]
            {
                new Oci.ApiGateway.Inputs.UsagePlanEntitlementTargetArgs
                {
                    DeploymentId = "string",
                },
            },
        },
    },
    DefinedTags = 
    {
        { "string", "string" },
    },
    DisplayName = "string",
    FreeformTags = 
    {
        { "string", "string" },
    },
});
example, err := apigateway.NewUsagePlan(ctx, "usagePlanResource", &apigateway.UsagePlanArgs{
	CompartmentId: pulumi.String("string"),
	Entitlements: apigateway.UsagePlanEntitlementArray{
		&apigateway.UsagePlanEntitlementArgs{
			Name:        pulumi.String("string"),
			Description: pulumi.String("string"),
			Quota: &apigateway.UsagePlanEntitlementQuotaArgs{
				OperationOnBreach: pulumi.String("string"),
				ResetPolicy:       pulumi.String("string"),
				Unit:              pulumi.String("string"),
				Value:             pulumi.Int(0),
			},
			RateLimit: &apigateway.UsagePlanEntitlementRateLimitArgs{
				Unit:  pulumi.String("string"),
				Value: pulumi.Int(0),
			},
			Targets: apigateway.UsagePlanEntitlementTargetArray{
				&apigateway.UsagePlanEntitlementTargetArgs{
					DeploymentId: pulumi.String("string"),
				},
			},
		},
	},
	DefinedTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	DisplayName: pulumi.String("string"),
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var usagePlanResource = new UsagePlan("usagePlanResource", UsagePlanArgs.builder()
    .compartmentId("string")
    .entitlements(UsagePlanEntitlementArgs.builder()
        .name("string")
        .description("string")
        .quota(UsagePlanEntitlementQuotaArgs.builder()
            .operationOnBreach("string")
            .resetPolicy("string")
            .unit("string")
            .value(0)
            .build())
        .rateLimit(UsagePlanEntitlementRateLimitArgs.builder()
            .unit("string")
            .value(0)
            .build())
        .targets(UsagePlanEntitlementTargetArgs.builder()
            .deploymentId("string")
            .build())
        .build())
    .definedTags(Map.of("string", "string"))
    .displayName("string")
    .freeformTags(Map.of("string", "string"))
    .build());
usage_plan_resource = oci.api_gateway.UsagePlan("usagePlanResource",
    compartment_id="string",
    entitlements=[{
        "name": "string",
        "description": "string",
        "quota": {
            "operation_on_breach": "string",
            "reset_policy": "string",
            "unit": "string",
            "value": 0,
        },
        "rate_limit": {
            "unit": "string",
            "value": 0,
        },
        "targets": [{
            "deployment_id": "string",
        }],
    }],
    defined_tags={
        "string": "string",
    },
    display_name="string",
    freeform_tags={
        "string": "string",
    })
const usagePlanResource = new oci.apigateway.UsagePlan("usagePlanResource", {
    compartmentId: "string",
    entitlements: [{
        name: "string",
        description: "string",
        quota: {
            operationOnBreach: "string",
            resetPolicy: "string",
            unit: "string",
            value: 0,
        },
        rateLimit: {
            unit: "string",
            value: 0,
        },
        targets: [{
            deploymentId: "string",
        }],
    }],
    definedTags: {
        string: "string",
    },
    displayName: "string",
    freeformTags: {
        string: "string",
    },
});
type: oci:ApiGateway:UsagePlan
properties:
    compartmentId: string
    definedTags:
        string: string
    displayName: string
    entitlements:
        - description: string
          name: string
          quota:
            operationOnBreach: string
            resetPolicy: string
            unit: string
            value: 0
          rateLimit:
            unit: string
            value: 0
          targets:
            - deploymentId: string
    freeformTags:
        string: string
UsagePlan 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 UsagePlan resource accepts the following input properties:
- CompartmentId string
- (Updatable) The OCID of the compartment in which the resource is created.
- Entitlements
List<UsagePlan Entitlement> 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Dictionary<string, string>
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 OCID of the compartment in which the resource is created.
- Entitlements
[]UsagePlan Entitlement Args 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- map[string]string
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 OCID of the compartment in which the resource is created.
- entitlements
List<UsagePlan Entitlement> 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Map<String,String>
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 OCID of the compartment in which the resource is created.
- entitlements
UsagePlan Entitlement[] 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName string
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- {[key: string]: string}
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 OCID of the compartment in which the resource is created.
- entitlements
Sequence[UsagePlan Entitlement Args] 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- display_name str
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Mapping[str, str]
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 OCID of the compartment in which the resource is created.
- entitlements List<Property Map>
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Map<String>
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 UsagePlan resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- State string
- The current state of the usage plan.
- TimeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- Id string
- The provider-assigned unique ID for this managed resource.
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- State string
- The current state of the usage plan.
- TimeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- state String
- The current state of the usage plan.
- timeCreated String
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time this resource was last updated. An RFC3339 formatted datetime string.
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- state string
- The current state of the usage plan.
- timeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_details str
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- state str
- The current state of the usage plan.
- time_created str
- The time this resource was created. An RFC3339 formatted datetime string.
- time_updated str
- The time this resource was last updated. An RFC3339 formatted datetime string.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- state String
- The current state of the usage plan.
- timeCreated String
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time this resource was last updated. An RFC3339 formatted datetime string.
Look up Existing UsagePlan Resource
Get an existing UsagePlan 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?: UsagePlanState, opts?: CustomResourceOptions): UsagePlan@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        display_name: Optional[str] = None,
        entitlements: Optional[Sequence[UsagePlanEntitlementArgs]] = None,
        freeform_tags: Optional[Mapping[str, str]] = None,
        lifecycle_details: Optional[str] = None,
        state: Optional[str] = None,
        time_created: Optional[str] = None,
        time_updated: Optional[str] = None) -> UsagePlanfunc GetUsagePlan(ctx *Context, name string, id IDInput, state *UsagePlanState, opts ...ResourceOption) (*UsagePlan, error)public static UsagePlan Get(string name, Input<string> id, UsagePlanState? state, CustomResourceOptions? opts = null)public static UsagePlan get(String name, Output<String> id, UsagePlanState state, CustomResourceOptions options)resources:  _:    type: oci:ApiGateway:UsagePlan    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 OCID of the compartment in which the resource is created.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Entitlements
List<UsagePlan Entitlement> 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- Dictionary<string, string>
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- State string
- The current state of the usage plan.
- TimeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- CompartmentId string
- (Updatable) The OCID of the compartment in which the resource is created.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Entitlements
[]UsagePlan Entitlement Args 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- map[string]string
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- State string
- The current state of the usage plan.
- TimeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- compartmentId String
- (Updatable) The OCID of the compartment in which the resource is created.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- entitlements
List<UsagePlan Entitlement> 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- Map<String,String>
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- state String
- The current state of the usage plan.
- timeCreated String
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time this resource was last updated. An RFC3339 formatted datetime string.
- compartmentId string
- (Updatable) The OCID of the compartment in which the resource is created.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName string
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- entitlements
UsagePlan Entitlement[] 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- {[key: string]: string}
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 
- lifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- state string
- The current state of the usage plan.
- timeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- compartment_id str
- (Updatable) The OCID of the compartment in which the resource is created.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- display_name str
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- entitlements
Sequence[UsagePlan Entitlement Args] 
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- Mapping[str, str]
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 
- lifecycle_details str
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- state str
- The current state of the usage plan.
- time_created str
- The time this resource was created. An RFC3339 formatted datetime string.
- time_updated str
- The time this resource was last updated. An RFC3339 formatted datetime string.
- compartmentId String
- (Updatable) The OCID of the compartment in which the resource is created.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- entitlements List<Property Map>
- (Updatable) A collection of entitlements to assign to the newly created usage plan.
- Map<String>
- (Updatable) 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. Example: - {"Department": "Finance"}- ** 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 
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- state String
- The current state of the usage plan.
- timeCreated String
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time this resource was last updated. An RFC3339 formatted datetime string.
Supporting Types
UsagePlanEntitlement, UsagePlanEntitlementArgs      
- Name string
- (Updatable) An entitlement name, unique within a usage plan.
- Description string
- (Updatable) A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- Quota
UsagePlan Entitlement Quota 
- (Updatable) Quota policy for a usage plan.
- RateLimit UsagePlan Entitlement Rate Limit 
- (Updatable) Rate-limiting policy for a usage plan.
- Targets
List<UsagePlan Entitlement Target> 
- (Updatable) A collection of targeted deployments that the entitlement will be applied to.
- Name string
- (Updatable) An entitlement name, unique within a usage plan.
- Description string
- (Updatable) A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- Quota
UsagePlan Entitlement Quota 
- (Updatable) Quota policy for a usage plan.
- RateLimit UsagePlan Entitlement Rate Limit 
- (Updatable) Rate-limiting policy for a usage plan.
- Targets
[]UsagePlan Entitlement Target 
- (Updatable) A collection of targeted deployments that the entitlement will be applied to.
- name String
- (Updatable) An entitlement name, unique within a usage plan.
- description String
- (Updatable) A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- quota
UsagePlan Entitlement Quota 
- (Updatable) Quota policy for a usage plan.
- rateLimit UsagePlan Entitlement Rate Limit 
- (Updatable) Rate-limiting policy for a usage plan.
- targets
List<UsagePlan Entitlement Target> 
- (Updatable) A collection of targeted deployments that the entitlement will be applied to.
- name string
- (Updatable) An entitlement name, unique within a usage plan.
- description string
- (Updatable) A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- quota
UsagePlan Entitlement Quota 
- (Updatable) Quota policy for a usage plan.
- rateLimit UsagePlan Entitlement Rate Limit 
- (Updatable) Rate-limiting policy for a usage plan.
- targets
UsagePlan Entitlement Target[] 
- (Updatable) A collection of targeted deployments that the entitlement will be applied to.
- name str
- (Updatable) An entitlement name, unique within a usage plan.
- description str
- (Updatable) A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- quota
UsagePlan Entitlement Quota 
- (Updatable) Quota policy for a usage plan.
- rate_limit UsagePlan Entitlement Rate Limit 
- (Updatable) Rate-limiting policy for a usage plan.
- targets
Sequence[UsagePlan Entitlement Target] 
- (Updatable) A collection of targeted deployments that the entitlement will be applied to.
- name String
- (Updatable) An entitlement name, unique within a usage plan.
- description String
- (Updatable) A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- quota Property Map
- (Updatable) Quota policy for a usage plan.
- rateLimit Property Map
- (Updatable) Rate-limiting policy for a usage plan.
- targets List<Property Map>
- (Updatable) A collection of targeted deployments that the entitlement will be applied to.
UsagePlanEntitlementQuota, UsagePlanEntitlementQuotaArgs        
- OperationOn stringBreach 
- (Updatable) What the usage plan will do when a quota is breached: REJECTwill allow no further requestsALLOWwill continue to allow further requests
- ResetPolicy string
- (Updatable) The policy that controls when quotas will reset. Example: CALENDAR
- Unit string
- (Updatable) The unit of time over which quotas are calculated. Example: MINUTEorMONTH
- Value int
- (Updatable) The number of requests that can be made per time period.
- OperationOn stringBreach 
- (Updatable) What the usage plan will do when a quota is breached: REJECTwill allow no further requestsALLOWwill continue to allow further requests
- ResetPolicy string
- (Updatable) The policy that controls when quotas will reset. Example: CALENDAR
- Unit string
- (Updatable) The unit of time over which quotas are calculated. Example: MINUTEorMONTH
- Value int
- (Updatable) The number of requests that can be made per time period.
- operationOn StringBreach 
- (Updatable) What the usage plan will do when a quota is breached: REJECTwill allow no further requestsALLOWwill continue to allow further requests
- resetPolicy String
- (Updatable) The policy that controls when quotas will reset. Example: CALENDAR
- unit String
- (Updatable) The unit of time over which quotas are calculated. Example: MINUTEorMONTH
- value Integer
- (Updatable) The number of requests that can be made per time period.
- operationOn stringBreach 
- (Updatable) What the usage plan will do when a quota is breached: REJECTwill allow no further requestsALLOWwill continue to allow further requests
- resetPolicy string
- (Updatable) The policy that controls when quotas will reset. Example: CALENDAR
- unit string
- (Updatable) The unit of time over which quotas are calculated. Example: MINUTEorMONTH
- value number
- (Updatable) The number of requests that can be made per time period.
- operation_on_ strbreach 
- (Updatable) What the usage plan will do when a quota is breached: REJECTwill allow no further requestsALLOWwill continue to allow further requests
- reset_policy str
- (Updatable) The policy that controls when quotas will reset. Example: CALENDAR
- unit str
- (Updatable) The unit of time over which quotas are calculated. Example: MINUTEorMONTH
- value int
- (Updatable) The number of requests that can be made per time period.
- operationOn StringBreach 
- (Updatable) What the usage plan will do when a quota is breached: REJECTwill allow no further requestsALLOWwill continue to allow further requests
- resetPolicy String
- (Updatable) The policy that controls when quotas will reset. Example: CALENDAR
- unit String
- (Updatable) The unit of time over which quotas are calculated. Example: MINUTEorMONTH
- value Number
- (Updatable) The number of requests that can be made per time period.
UsagePlanEntitlementRateLimit, UsagePlanEntitlementRateLimitArgs          
UsagePlanEntitlementTarget, UsagePlanEntitlementTargetArgs        
- DeploymentId string
- (Updatable) The OCID of a deployment resource.
- DeploymentId string
- (Updatable) The OCID of a deployment resource.
- deploymentId String
- (Updatable) The OCID of a deployment resource.
- deploymentId string
- (Updatable) The OCID of a deployment resource.
- deployment_id str
- (Updatable) The OCID of a deployment resource.
- deploymentId String
- (Updatable) The OCID of a deployment resource.
Import
UsagePlans can be imported using the id, e.g.
$ pulumi import oci:ApiGateway/usagePlan:UsagePlan test_usage_plan "id"
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.