apimtool

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

APIM Tool

Azure API Management Tool To support configuration of Microsoft Azure API Management.

GitHub release (latest SemVer) GitHub

Linux macOS Windows

Using Azure CLI to Sign In

You could easily use az login in command line to sign in to Azure via your default browser. Detail instructions can be found in Sign in with Azure CLI.

az login

Initialize Environment Variables

Before to use, you must set Subscription ID and Location to CLI connect to Azure resource.

Name Value
APIMTOOL_AZURE_SUBSCRIPTION_ID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
APIMTOOL_AZURE_LOCATION southeastasia

APIM command directly

List Backends

List of all Backends from API management

Arguments

--resource-group my resource group from azure

--service-name my service from azure

apimtool apim backend list --resource-group rg-my-resource-group --service-name apim-my-name
List APIs

List all API on Azure API Management.

Arguments

--resource-group my resource group from azure

--service-name my service from azure

-o/--option option to view [default :table/list]

apimtool apim api list --resource-group rg-my-resource-group --service-name apim-my-name -o list
List APIs Depending on backend

Arguments

--resource-group my resource group from azure

--service-name my service from azure

--backend-id backend-id [table/list]

--url target backend URL

--protocol support 2 types only {http,soap}

apimtool apim backend api depend list --resource-group rg-my-resource-group --service-name apim-my-name --backend-id mybackend --url https://httpbin.org --protocol {http/soap}
Create Backend

Create backend on Azure API Management and check duplication before created.

Arguments

--resource-group my resource group from azure

--service-name my service from azure

--backend-id backend-id [table/list]

--url target backend URL

--protocol support 2 types only {http,soap}

apimtool apim backend create --resource-group rg-my-resource-group --service-name apim-my-name --backend-id mybackend --url https://httpbin.org --protocol {http/soap}

Parser To Support Source to ARM Template

Parser Config file JSON to source templates

Arguments

--resource-group my resource group from azure

--service-name my service from azure

--api-id API ID on Azure API Management

--file-path path to file config

apimtool parse --env dev --api-id myapiid --resource-group rg-my-resource-group --service-name apim-my-name [--file-path {./apim-apis-dev/myapiname/myapiname.json}]

Template (ARM)

Add Backend into ARM Templates

Add backend into backends.template.json and check validate IP target.

Arguments

--resource-group my resource group from azure

--service-name my service from azure

--backend-id Backend ID on Azure API Management

apimtool template backend create --resource-group rg-my-resource-group --service-name apim-my-name --backend-id hello --url https://tarathep.com --protocol http
Export Backend ARM Template from APIM

Export configuration and create backends.template.json from source APIM.

Arguments

--resource-group my resource group from azure

--service-name my service from azure

--backend-id Backend ID on Azure API Management

apimtool template backend export --resource-group rg-my-resource-group --service-name apim-my-name

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL