Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.ApiGateway.getUsagePlans
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides the list of Usage Plans in Oracle Cloud Infrastructure API Gateway service.
Returns a list of usage plans.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testUsagePlans = oci.ApiGateway.getUsagePlans({
compartmentId: compartmentId,
displayName: usagePlanDisplayName,
state: usagePlanState,
});
import pulumi
import pulumi_oci as oci
test_usage_plans = oci.ApiGateway.get_usage_plans(compartment_id=compartment_id,
display_name=usage_plan_display_name,
state=usage_plan_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/ApiGateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ApiGateway.GetUsagePlans(ctx, &apigateway.GetUsagePlansArgs{
CompartmentId: compartmentId,
DisplayName: pulumi.StringRef(usagePlanDisplayName),
State: pulumi.StringRef(usagePlanState),
}, nil)
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 testUsagePlans = Oci.ApiGateway.GetUsagePlans.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = usagePlanDisplayName,
State = usagePlanState,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ApiGateway.ApiGatewayFunctions;
import com.pulumi.oci.ApiGateway.inputs.GetUsagePlansArgs;
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) {
final var testUsagePlans = ApiGatewayFunctions.getUsagePlans(GetUsagePlansArgs.builder()
.compartmentId(compartmentId)
.displayName(usagePlanDisplayName)
.state(usagePlanState)
.build());
}
}
variables:
testUsagePlans:
fn::invoke:
Function: oci:ApiGateway:getUsagePlans
Arguments:
compartmentId: ${compartmentId}
displayName: ${usagePlanDisplayName}
state: ${usagePlanState}
Using getUsagePlans
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getUsagePlans(args: GetUsagePlansArgs, opts?: InvokeOptions): Promise<GetUsagePlansResult>
function getUsagePlansOutput(args: GetUsagePlansOutputArgs, opts?: InvokeOptions): Output<GetUsagePlansResult>
def get_usage_plans(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_apigateway.GetUsagePlansFilter]] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUsagePlansResult
def get_usage_plans_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_apigateway.GetUsagePlansFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUsagePlansResult]
func GetUsagePlans(ctx *Context, args *GetUsagePlansArgs, opts ...InvokeOption) (*GetUsagePlansResult, error)
func GetUsagePlansOutput(ctx *Context, args *GetUsagePlansOutputArgs, opts ...InvokeOption) GetUsagePlansResultOutput
> Note: This function is named GetUsagePlans
in the Go SDK.
public static class GetUsagePlans
{
public static Task<GetUsagePlansResult> InvokeAsync(GetUsagePlansArgs args, InvokeOptions? opts = null)
public static Output<GetUsagePlansResult> Invoke(GetUsagePlansInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUsagePlansResult> getUsagePlans(GetUsagePlansArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:ApiGateway/getUsagePlans:getUsagePlans
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The ocid of the compartment in which to list resources.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- Filters
List<Get
Usage Plans Filter> - State string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- Compartment
Id string - The ocid of the compartment in which to list resources.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- Filters
[]Get
Usage Plans Filter - State string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- compartment
Id String - The ocid of the compartment in which to list resources.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- filters
List<Get
Usage Plans Filter> - state String
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- compartment
Id string - The ocid of the compartment in which to list resources.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- filters
Get
Usage Plans Filter[] - state string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- compartment_
id str - The ocid of the compartment in which to list resources.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- filters
Sequence[apigateway.
Get Usage Plans Filter] - state str
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- compartment
Id String - The ocid of the compartment in which to list resources.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- filters List<Property Map>
- state String
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
getUsagePlans Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment in which the resource is created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Usage
Plan List<GetCollections Usage Plans Usage Plan Collection> - The list of usage_plan_collection.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- Filters
List<Get
Usage Plans Filter> - State string
- The current state of the usage plan.
- Compartment
Id string - The OCID of the compartment in which the resource is created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Usage
Plan []GetCollections Usage Plans Usage Plan Collection - The list of usage_plan_collection.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- Filters
[]Get
Usage Plans Filter - State string
- The current state of the usage plan.
- compartment
Id String - The OCID of the compartment in which the resource is created.
- id String
- The provider-assigned unique ID for this managed resource.
- usage
Plan List<GetCollections Usage Plans Usage Plan Collection> - The list of usage_plan_collection.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- filters
List<Get
Usage Plans Filter> - state String
- The current state of the usage plan.
- compartment
Id string - The OCID of the compartment in which the resource is created.
- id string
- The provider-assigned unique ID for this managed resource.
- usage
Plan GetCollections Usage Plans Usage Plan Collection[] - The list of usage_plan_collection.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- filters
Get
Usage Plans Filter[] - state string
- The current state of the usage plan.
- compartment_
id str - The OCID of the compartment in which the resource is created.
- id str
- The provider-assigned unique ID for this managed resource.
- usage_
plan_ Sequence[apigateway.collections Get Usage Plans Usage Plan Collection] - The list of usage_plan_collection.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- filters
Sequence[apigateway.
Get Usage Plans Filter] - state str
- The current state of the usage plan.
- compartment
Id String - The OCID of the compartment in which the resource is created.
- id String
- The provider-assigned unique ID for this managed resource.
- usage
Plan List<Property Map>Collections - The list of usage_plan_collection.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- filters List<Property Map>
- state String
- The current state of the usage plan.
Supporting Types
GetUsagePlansFilter
GetUsagePlansUsagePlanCollection
GetUsagePlansUsagePlanCollectionItem
- Compartment
Id string - The ocid of the compartment in which to list resources.
- Dictionary<string, object>
- 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 - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- Entitlements
List<Get
Usage Plans Usage Plan Collection Item Entitlement> - A collection of entitlements currently assigned to the usage plan.
- Dictionary<string, object>
- 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"}
- Id string
- The OCID of a usage plan 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
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- 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 - The ocid of the compartment in which to list resources.
- map[string]interface{}
- 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 - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- Entitlements
[]Get
Usage Plans Usage Plan Collection Item Entitlement - A collection of entitlements currently assigned to the usage plan.
- map[string]interface{}
- 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"}
- Id string
- The OCID of a usage plan 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
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- 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 - The ocid of the compartment in which to list resources.
- Map<String,Object>
- 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 - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- entitlements
List<Get
Usage Plans Usage Plan Collection Item Entitlement> - A collection of entitlements currently assigned to the usage plan.
- Map<String,Object>
- 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"}
- id String
- The OCID of a usage plan 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
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- 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 - The ocid of the compartment in which to list resources.
- {[key: string]: any}
- 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 - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- entitlements
Get
Usage Plans Usage Plan Collection Item Entitlement[] - A collection of entitlements currently assigned to the usage plan.
- {[key: string]: any}
- 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"}
- id string
- The OCID of a usage plan 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
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- 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 - The ocid of the compartment in which to list resources.
- Mapping[str, Any]
- 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 - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- entitlements
Sequence[apigateway.
Get Usage Plans Usage Plan Collection Item Entitlement] - A collection of entitlements currently assigned to the usage plan.
- Mapping[str, Any]
- 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"}
- id str
- The OCID of a usage plan 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
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- 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 - The ocid of the compartment in which to list resources.
- Map<Any>
- 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 - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- entitlements List<Property Map>
- A collection of entitlements currently assigned to the usage plan.
- Map<Any>
- 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"}
- id String
- The OCID of a usage plan 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
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- 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.
GetUsagePlansUsagePlanCollectionItemEntitlement
- Description string
- A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- Name string
- An entitlement name, unique within a usage plan.
- Quotas
List<Get
Usage Plans Usage Plan Collection Item Entitlement Quota> - Quota policy for a usage plan.
- Rate
Limits List<GetUsage Plans Usage Plan Collection Item Entitlement Rate Limit> - Rate-limiting policy for a usage plan.
- Targets
List<Get
Usage Plans Usage Plan Collection Item Entitlement Target> - A collection of targeted deployments that the entitlement will be applied to.
- Description string
- A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- Name string
- An entitlement name, unique within a usage plan.
- Quotas
[]Get
Usage Plans Usage Plan Collection Item Entitlement Quota - Quota policy for a usage plan.
- Rate
Limits []GetUsage Plans Usage Plan Collection Item Entitlement Rate Limit - Rate-limiting policy for a usage plan.
- Targets
[]Get
Usage Plans Usage Plan Collection Item Entitlement Target - A collection of targeted deployments that the entitlement will be applied to.
- description String
- A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- name String
- An entitlement name, unique within a usage plan.
- quotas
List<Get
Usage Plans Usage Plan Collection Item Entitlement Quota> - Quota policy for a usage plan.
- rate
Limits List<GetUsage Plans Usage Plan Collection Item Entitlement Rate Limit> - Rate-limiting policy for a usage plan.
- targets
List<Get
Usage Plans Usage Plan Collection Item Entitlement Target> - A collection of targeted deployments that the entitlement will be applied to.
- description string
- A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- name string
- An entitlement name, unique within a usage plan.
- quotas
Get
Usage Plans Usage Plan Collection Item Entitlement Quota[] - Quota policy for a usage plan.
- rate
Limits GetUsage Plans Usage Plan Collection Item Entitlement Rate Limit[] - Rate-limiting policy for a usage plan.
- targets
Get
Usage Plans Usage Plan Collection Item Entitlement Target[] - A collection of targeted deployments that the entitlement will be applied to.
- description str
- A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- name str
- An entitlement name, unique within a usage plan.
- quotas
Sequence[apigateway.
Get Usage Plans Usage Plan Collection Item Entitlement Quota] - Quota policy for a usage plan.
- rate_
limits Sequence[apigateway.Get Usage Plans Usage Plan Collection Item Entitlement Rate Limit] - Rate-limiting policy for a usage plan.
- targets
Sequence[apigateway.
Get Usage Plans Usage Plan Collection Item Entitlement Target] - A collection of targeted deployments that the entitlement will be applied to.
- description String
- A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
- name String
- An entitlement name, unique within a usage plan.
- quotas List<Property Map>
- Quota policy for a usage plan.
- rate
Limits List<Property Map> - Rate-limiting policy for a usage plan.
- targets List<Property Map>
- A collection of targeted deployments that the entitlement will be applied to.
GetUsagePlansUsagePlanCollectionItemEntitlementQuota
- Operation
On stringBreach - 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 - The policy that controls when quotas will reset. Example:
CALENDAR
- Unit string
- The unit of time over which rate limits are calculated. Example:
SECOND
- Value int
- The number of requests that can be made per time period.
- Operation
On stringBreach - 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 - The policy that controls when quotas will reset. Example:
CALENDAR
- Unit string
- The unit of time over which rate limits are calculated. Example:
SECOND
- Value int
- The number of requests that can be made per time period.
- operation
On StringBreach - 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 - The policy that controls when quotas will reset. Example:
CALENDAR
- unit String
- The unit of time over which rate limits are calculated. Example:
SECOND
- value Integer
- The number of requests that can be made per time period.
- operation
On stringBreach - 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 - The policy that controls when quotas will reset. Example:
CALENDAR
- unit string
- The unit of time over which rate limits are calculated. Example:
SECOND
- value number
- The number of requests that can be made per time period.
- operation_
on_ strbreach - 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 - The policy that controls when quotas will reset. Example:
CALENDAR
- unit str
- The unit of time over which rate limits are calculated. Example:
SECOND
- value int
- The number of requests that can be made per time period.
- operation
On StringBreach - 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 - The policy that controls when quotas will reset. Example:
CALENDAR
- unit String
- The unit of time over which rate limits are calculated. Example:
SECOND
- value Number
- The number of requests that can be made per time period.
GetUsagePlansUsagePlanCollectionItemEntitlementRateLimit
GetUsagePlansUsagePlanCollectionItemEntitlementTarget
- Deployment
Id string - The OCID of a deployment resource.
- Deployment
Id string - The OCID of a deployment resource.
- deployment
Id String - The OCID of a deployment resource.
- deployment
Id string - The OCID of a deployment resource.
- deployment_
id str - The OCID of a deployment resource.
- deployment
Id String - The OCID of a deployment resource.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi