Skip to content

Commit

Permalink
refactor: integration examples
Browse files Browse the repository at this point in the history
  • Loading branch information
frankqianms committed Jan 9, 2025
1 parent 829e1fe commit 9542e3f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/apic-extension/azext_apic_extension/command_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ class CreateApimIntegration(DefaultWorkspaceParameter, CreateIntegration):
"""Add Azure APIM as an API source
:example: Add Azure APIM in the same resource group as the Azure API Center instance as an API source
az apic integration create apim -g contoso-resources -n contoso --integration-name sync-from-my-apim --azure-apim myapim
az apic integration create apim -g contoso-resources -n contoso -i sync-from-my-apim --azure-apim myapim
:example: Add Azure APIM in another resource group as an API source
az apic integration create apim -g contoso-resources -n contoso --integration-name sync-from-my-apim --azure-apim /subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/samplegroup/providers/Microsoft.ApiManagement/service/sampleapim
az apic integration create apim -g contoso-resources -n contoso -i sync-from-my-apim --azure-apim /subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/samplegroup/providers/Microsoft.ApiManagement/service/sampleapim
"""
# pylint: enable=C0301
Expand Down Expand Up @@ -415,7 +415,7 @@ class CreateAmazonApiGatewayIntegration(DefaultWorkspaceParameter, CreateIntegra
"""Add Amazon API Gateway as an API source
:example: Add Amazon API Gateway as an API source
az apic integration create aws -g contoso-resources -n contoso --integration-name sync-from-my-amazon-api-gateway --aws-access-key-reference https://mykey.vault.azure.net/secrets/AccessKey --aws-secret-access-key-reference https://mykey.vault.azure.net/secrets/SecretAccessKey --aws-region-name us-east-2
az apic integration create aws -g contoso-resources -n contoso -i sync-from-my-amazon-api-gateway -a https://{keyvaultName}.vault.azure.net/secrets/{secretName1} -s https://{keyvaultName}.vault.azure.net/secrets/{secretName2} -r us-east-2
"""

@classmethod
Expand Down Expand Up @@ -444,7 +444,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
required=True,
)
args_schema.region_name = AAZStrArg(
options=["--aws-region-name"],
options=["--aws-region-name", "-r"],
arg_group="AmazonApiGatewaySource",
help="Amazon API Gateway Region (ex. us-east-2).",
required=True,
Expand Down Expand Up @@ -482,7 +482,7 @@ class ImportAmazonApiGatewaySource(DefaultWorkspaceParameter, Import):
"""Import an Amazon API Gateway API source
:example: Import an Amazon API Gateway API source
az apic import aws -g contoso-resources -n contoso --aws-access-key-reference https://mykey.vault.azure.net/secrets/AccessKey --aws-secret-access-key-reference https://mykey.vault.azure.net/secrets/SecretAccessKey --aws-region-name us-east-2
az apic import aws -g contoso-resources -n contoso -a https://{keyvaultName}.vault.azure.net/secrets/{secretName1} -s https://{keyvaultName}.vault.azure.net/secrets/{secretName2} -r us-east-2
"""

@classmethod
Expand Down Expand Up @@ -512,7 +512,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
required=True,
)
args_schema.region_name = AAZStrArg(
options=["--aws-region-name"],
options=["--aws-region-name", "-r"],
arg_group="AmazonApiGatewaySource",
help="Amazon API Gateway Region (ex. us-east-2).",
required=True,
Expand Down

0 comments on commit 9542e3f

Please sign in to comment.