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[_apigateway.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=[oci.api_gateway.UsagePlanEntitlementArgs(
name="string",
description="string",
quota=oci.api_gateway.UsagePlanEntitlementQuotaArgs(
operation_on_breach="string",
reset_policy="string",
unit="string",
value=0,
),
rate_limit=oci.api_gateway.UsagePlanEntitlementRateLimitArgs(
unit="string",
value=0,
),
targets=[oci.api_gateway.UsagePlanEntitlementTargetArgs(
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
The UsagePlan resource accepts the following input properties:
- Compartment
Id string - (Updatable) The OCID of the compartment in which the resource is created.
- Entitlements
List<Usage
Plan 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"}
- Display
Name 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
- Compartment
Id string - (Updatable) The OCID of the compartment in which the resource is created.
- Entitlements
[]Usage
Plan 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"}
- Display
Name 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
- compartment
Id String - (Updatable) The OCID of the compartment in which the resource is created.
- entitlements
List<Usage
Plan 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"}
- display
Name 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
- compartment
Id string - (Updatable) The OCID of the compartment in which the resource is created.
- entitlements
Usage
Plan 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"}
- display
Name 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[apigateway.
Usage Plan 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
- compartment
Id 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"}
- display
Name 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.
- Lifecycle
Details 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.
- Time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time this resource was last updated. An RFC3339 formatted datetime string.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details 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.
- Time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time this resource was last updated. An RFC3339 formatted datetime string.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details 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.
- time
Created String - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated String - The time this resource was last updated. An RFC3339 formatted datetime string.
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details 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.
- time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated 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.
- lifecycle
Details 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.
- time
Created String - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated 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[_apigateway.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) -> UsagePlan
func 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)
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.
- Compartment
Id 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"}
- Display
Name 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<Usage
Plan 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
- Lifecycle
Details 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.
- Time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time this resource was last updated. An RFC3339 formatted datetime string.
- Compartment
Id 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"}
- Display
Name 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
[]Usage
Plan 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
- Lifecycle
Details 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.
- Time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time this resource was last updated. An RFC3339 formatted datetime string.
- compartment
Id 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"}
- display
Name 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<Usage
Plan 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
- lifecycle
Details 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.
- time
Created String - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated String - The time this resource was last updated. An RFC3339 formatted datetime string.
- compartment
Id 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"}
- display
Name 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
Usage
Plan 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
- lifecycle
Details 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.
- time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated 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[apigateway.
Usage Plan 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.
- compartment
Id 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"}
- display
Name 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
- lifecycle
Details 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.
- time
Created String - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated 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
Usage
Plan Entitlement Quota - (Updatable) Quota policy for a usage plan.
- Rate
Limit UsagePlan Entitlement Rate Limit - (Updatable) Rate-limiting policy for a usage plan.
- Targets
List<Usage
Plan 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
Usage
Plan Entitlement Quota - (Updatable) Quota policy for a usage plan.
- Rate
Limit UsagePlan Entitlement Rate Limit - (Updatable) Rate-limiting policy for a usage plan.
- Targets
[]Usage
Plan 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
Usage
Plan Entitlement Quota - (Updatable) Quota policy for a usage plan.
- rate
Limit UsagePlan Entitlement Rate Limit - (Updatable) Rate-limiting policy for a usage plan.
- targets
List<Usage
Plan 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
Usage
Plan Entitlement Quota - (Updatable) Quota policy for a usage plan.
- rate
Limit UsagePlan Entitlement Rate Limit - (Updatable) Rate-limiting policy for a usage plan.
- targets
Usage
Plan 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
apigateway.
Usage Plan Entitlement Quota - (Updatable) Quota policy for a usage plan.
- rate_
limit apigateway.Usage Plan Entitlement Rate Limit - (Updatable) Rate-limiting policy for a usage plan.
- targets
Sequence[apigateway.
Usage Plan 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.
- rate
Limit 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
- Operation
On stringBreach - (Updatable) What the usage plan will do when a quota is breached:
REJECT
will allow no further requestsALLOW
will continue to allow further requests - Reset
Policy 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:
MINUTE
orMONTH
- Value int
- (Updatable) The number of requests that can be made per time period.
- Operation
On stringBreach - (Updatable) What the usage plan will do when a quota is breached:
REJECT
will allow no further requestsALLOW
will continue to allow further requests - Reset
Policy 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:
MINUTE
orMONTH
- Value int
- (Updatable) The number of requests that can be made per time period.
- operation
On StringBreach - (Updatable) What the usage plan will do when a quota is breached:
REJECT
will allow no further requestsALLOW
will continue to allow further requests - reset
Policy 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:
MINUTE
orMONTH
- value Integer
- (Updatable) The number of requests that can be made per time period.
- operation
On stringBreach - (Updatable) What the usage plan will do when a quota is breached:
REJECT
will allow no further requestsALLOW
will continue to allow further requests - reset
Policy 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:
MINUTE
orMONTH
- 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:
REJECT
will allow no further requestsALLOW
will 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:
MINUTE
orMONTH
- value int
- (Updatable) The number of requests that can be made per time period.
- operation
On StringBreach - (Updatable) What the usage plan will do when a quota is breached:
REJECT
will allow no further requestsALLOW
will continue to allow further requests - reset
Policy 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:
MINUTE
orMONTH
- value Number
- (Updatable) The number of requests that can be made per time period.
UsagePlanEntitlementRateLimit, UsagePlanEntitlementRateLimitArgs
UsagePlanEntitlementTarget, UsagePlanEntitlementTargetArgs
- Deployment
Id string - (Updatable) The OCID of a deployment resource.
- Deployment
Id string - (Updatable) The OCID of a deployment resource.
- deployment
Id String - (Updatable) The OCID of a deployment resource.
- deployment
Id string - (Updatable) The OCID of a deployment resource.
- deployment_
id str - (Updatable) The OCID of a deployment resource.
- deployment
Id 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
oci
Terraform Provider.