Skip to content

Commit

Permalink
doc: update sample
Browse files Browse the repository at this point in the history
  • Loading branch information
blackchoey committed Dec 13, 2024
1 parent 97f65c2 commit 43be178
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/apic-extension/azext_apic_extension/command_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,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-id sync-from-my-apim --apim-name myapim
az apic integration create apim -g contoso-resources -n contoso --integration-name 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-id sync-from-my-apim --apim-name myapim --apim-resource-group myapim-resource-group
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
"""
# pylint: enable=C0301
Expand Down Expand Up @@ -369,7 +369,7 @@ def pre_operations(self):
super().pre_operations()
args = self.ctx.args

if not is_valid_resource_id(args.azure_apim):
if not is_valid_resource_id(args.azure_apim.to_serialized_data()):
# The APIM is in the same resource group
resource_group = args.resource_group
subscription_id = self.ctx.subscription_id
Expand All @@ -396,7 +396,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-id 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 --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
"""

@classmethod
Expand Down

0 comments on commit 43be178

Please sign in to comment.