How to use get_usage_plan method in localstack

Best Python code snippet using localstack_python

get_usage_plan.py

Source:get_usage_plan.py Github

copy

Full Screen

...143 state=self.state,144 time_created=self.time_created,145 time_updated=self.time_updated,146 usage_plan_id=self.usage_plan_id)147def get_usage_plan(usage_plan_id: Optional[str] = None,148 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUsagePlanResult:149 """150 This data source provides details about a specific Usage Plan resource in Oracle Cloud Infrastructure API Gateway service.151 Gets a usage plan by identifier.152 ## Example Usage153 ```python154 import pulumi155 import pulumi_oci as oci156 test_usage_plan = oci.ApiGateway.get_usage_plan(usage_plan_id=oci_apigateway_usage_plan["test_usage_plan"]["id"])157 ```158 :param str usage_plan_id: The ocid of the usage plan.159 """160 __args__ = dict()161 __args__['usagePlanId'] = usage_plan_id162 opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)163 __ret__ = pulumi.runtime.invoke('oci:ApiGateway/getUsagePlan:getUsagePlan', __args__, opts=opts, typ=GetUsagePlanResult).value164 return AwaitableGetUsagePlanResult(165 compartment_id=__ret__.compartment_id,166 defined_tags=__ret__.defined_tags,167 display_name=__ret__.display_name,168 entitlements=__ret__.entitlements,169 freeform_tags=__ret__.freeform_tags,170 id=__ret__.id,171 lifecycle_details=__ret__.lifecycle_details,172 state=__ret__.state,173 time_created=__ret__.time_created,174 time_updated=__ret__.time_updated,175 usage_plan_id=__ret__.usage_plan_id)176@_utilities.lift_output_func(get_usage_plan)177def get_usage_plan_output(usage_plan_id: Optional[pulumi.Input[str]] = None,178 opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetUsagePlanResult]:179 """180 This data source provides details about a specific Usage Plan resource in Oracle Cloud Infrastructure API Gateway service.181 Gets a usage plan by identifier.182 ## Example Usage183 ```python184 import pulumi185 import pulumi_oci as oci186 test_usage_plan = oci.ApiGateway.get_usage_plan(usage_plan_id=oci_apigateway_usage_plan["test_usage_plan"]["id"])187 ```188 :param str usage_plan_id: The ocid of the usage plan.189 """...

Full Screen

Full Screen

test_api_with_usage_plan.py

Source:test_api_with_usage_plan.py Github

copy

Full Screen

...9 outputs = self.get_stack_outputs()10 apigw_client = self.client_provider.api_client11 serverless_usage_plan_id = outputs["ServerlessUsagePlan"]12 my_api_usage_plan_id = outputs["MyApiUsagePlan"]13 serverless_usage_plan = apigw_client.get_usage_plan(usagePlanId=serverless_usage_plan_id)14 my_api_usage_plan = apigw_client.get_usage_plan(usagePlanId=my_api_usage_plan_id)15 self.assertEqual(len(my_api_usage_plan["apiStages"]), 1)16 self.assertEqual(my_api_usage_plan["throttle"]["burstLimit"], 100)17 self.assertEqual(my_api_usage_plan["throttle"]["rateLimit"], 50.0)18 self.assertEqual(my_api_usage_plan["quota"]["limit"], 500)19 self.assertEqual(my_api_usage_plan["quota"]["period"], "MONTH")...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful