AWS Java SDK (API Gateway): How to disable an API key - aws-api-gateway

Hi I am trying to disable an API key programmatically, but can't find any documentation.
So far I have located 2 classes that might be what I need:
UpdateApiKeyRequest and DeleteApiKeyRequest. Problem is that I have no clue what to do with these.
Please could someone show me how to use these classes to disable or delete an API key?

You can use deleteApiKey API.
The SDK source code is available here. The documentation is available here.
Update:
You can disable an API Key using updateApiKey API.
The SDK is documented here. The API reference is here.
The below is a sample PatchOperations object to be sent in the PATCH request:
{"patchOperations":[{"op":"replace","path":"/enabled","value":"false"}]}

Related

Callin API with AOUTH from VSCode Extension

I'm developing a VSCode Extension.
And I wanna call APIs with OAUTH.
Please tell me how to call or sites showing samples.
=============================
I guess my issue is same with below sled.
Is it possible to Auth to an OAuth 2.0 API from inside a vscode extension
But I couldn't get solutions from here.
I resolved by myself.
I installed and used 'request' seeing below.
https://stormpath.com/blog/talking-to-oauth2-services-with-nodejs
The apis I would use need requests by 'post'.

Does Strongbox have a REST API and where can I find the specification?

I was wondering where I could find the REST API documentation for Strongbox and if at all it has one? Could somebody please tell me where to find this?
There are currently two ways to get the REST API documentation for Strongbox:
Get the strongbox-distribution and start it locally.
Clone the Strongbox project, (if you're interested in developing new functionality for Strongbox) and build it (by following the build instructions here) and start it locally.
You can then navigate to http://localhost:48080/docs/rest/api.html (as explained here in our wiki).
Disclaimer: I am the project owner of Strongbox.

Add custom methods and custom endpoints in SuiteCRM REST API V8

SuiteCRM version: Version 7.10.11
Sugar Version 6.5.25 (Build 344)
I am trying to add custom endpoints in REST API V8. I follow below suitecrm documentation.
https://docs.suitecrm.com/developer/api/version-8/customization/
but its not working. seems like bugs in documentation and there is no sample code available in documentation.
I have check API code file and custom endpoint path is.
// Load Custom Routes
$customRouteFiles = (array) glob($paths->getCustomLibraryPath() . '/API/v8/route/*.php');
I have create custom endpoints in "/API/v8/route/" file but its not working.
I have check documentation available for API 4_1 to add custom API method. but not available for V8 version.
https://docs.suitecrm.com/developer/api/api-4_1/#_adding_custom_api_methods
Anyone Please Suggest latest documentation links or sample code for extending endpoints and adding Custom Rest Methods in V8 . Its very difficult to understand core API code without Proper documentation.
Thanks

OpenAPI (aka Swagger) in Azure Functions V2

I'm creating a V2 Function App and want to use Swagger/Open API for docs, however it is not yet supported in the Azure Portal for V2 Functions.
Any suggestions on how I can use Swagger with V2 Functions in VSTS to create the docs on each build?
TL;DR - Use the NuGet package to render Open API document and Swagger UI through Azure Functions.
UPDATE (2021-06-04)
Microsoft recently announced the OpenAPI support on Azure Functions during the //Build event.
The Aliencube extension has now been archived and no longer supported. Please use this official extension.
As of today, it's in preview. Although it's in preview, it has more features than the Aliencube one.
Acknowledgement 2: I am still maintaining the official one.
Microsoft hasn’t officially started supporting Open API (or Swagger) yet. But there is a community-driven NuGet package currently available:
Nuget > Aliencube.AzureFunctions.Extensions.OpenApi
And here’s the blog post for it:
Introducing Swagger UI on Azure Functions
Basically its usage is similar to Swashbuckle — using decorators. And it supports both Azure Functions V1 and V2.
Acknowledgement 1: I am the owner of the NuGet package.
For anyone looking into this, Microsoft still hasn't added Open API support for Azure Functions +v2 and there hasn't been any major movement toward it.
I faced this same issue recently and I found a pretty good solution.
If you aren't aware yet, check this out: https://github.com/RicoSuter/NSwag
NSwag is a toolchain that integrates with .NET to produce the Open API documentation and UI, but also generates the respective API clients for you.
I've used this tool for the past 2 years when working with Angular and .NET apps, it saves a lot of time and seamlessly integrates with my whole development workflow.
For Azure Functions +v2, a contributor created a generator that in less than 10 lines of code, allow us to expose the Swagger endpoint for an Azure Function class:
https://github.com/Jusas/NSwag.AzureFunctionsV2
Now, if you design HTTP-Triggered Functions using DI, grouping related operations under the same class and leveraging model binding, you might not even need to apply any custom decorator, it just works!
Here's an example of how one real API would look like:
(ignore the base class. It is part of a personal pattern I follow, unrelated to Swagger)
And this is how it looks like using a swagger UI:
There is official library Azure Functions OpenAPI Extension. It is still in preview, but looks great.
Can you drop your V2 Function to run on v1 of the runtime by starting over with a blank function app first?
The MSDN documents for Create an OpenAPI definition for a function (with a date of 11/2018 interestingly enough) example states:
By default, the function app you create uses version 2.x of the
runtime. You must set the runtime version back to 1.x before you
create your function.
But one can't just move the setting to 1:
To pin your function app to the version 1.x runtime, choose ~1 under
Runtime version. This switch is disabled when you have functions in
your app.
Which implies one must create the Function app, publish/create it, set it to V1 and then put in a function before adding a function app.

Issue with adding sudzc.xcode framework to my application

I am using web service in my IOS application. Its all the WSDL calls. So i used Sudzc.com to generate all the service call Soap requests. Here my problem is how to add the generated sudzc.xcode framework to my application. Someone told me like we can add generated .xcode framework to our application. Can any one please suggest me.
Very simple, please follow the movy that is on the sudzc page. It helped me too.
Here a link to the movy:
http://sudzc.com/Tutorial/ObjC.mov
For automatic reference counting, select it from the dropdown.