-
Notifications
You must be signed in to change notification settings - Fork 4k
Aladdin generated examples for ApiManagement, DevTestLabs, EventHub, LogicApp, ServiceBus #12064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aladdin generated examples for ApiManagement, DevTestLabs, EventHub, LogicApp, ServiceBus #12064
Conversation
aladdindoc
commented
Jun 4, 2020
- Add Aladdin crafted examples.
…erviceBus - Add new examples to the following modules: ApiManagement DevTestLabs EventHub LogicApp ServiceBus
Can one of the admins verify this patch? |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Creates an API. (autogenerated) | ||
|
||
```powershell <!-- Aladdin Generated Example --> | ||
New-AzApiManagementApi -ApiId '0001' -Context <PsApiManagementContext> -Name 'Echo api' -Path 'echov3' -Protocols Http -ServiceUrl 'https://contoso.com/apis/echo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I question about this example is the Http protocol is specified, but an HTTPS URL is provided. I would think the protocol would need to match the type URL for the example to be valid. Preferably, the Protocol would be Https in this example.
Modifies an API Schema. (autogenerated) | ||
|
||
```powershell <!-- Aladdin Generated Example --> | ||
Set-AzApiManagementApiSchema -ApiId 'echo-api' -Context <PsApiManagementContext> -SchemaDocumentContentType swaggerdefinition -SchemaDocumentFilePath C:\Users\sasolank\Downloads\petstoreschema.json -SchemaId '2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the provided values be the same case that they would tab expand to? For example, the value of -SchemaDocumentContentType is "swaggerdefinition" in this example. When the value is tab expanded, it's case is: "SwaggerDefinition".
Updates a Backend. (autogenerated) | ||
|
||
```powershell <!-- Aladdin Generated Example --> | ||
Set-AzApiManagementBackend -BackendId 123 -Context <PsApiManagementContext> -Credential <PsApiManagementBackendCredential> -Protocol http -ResourceId /subscriptions/subid/resourceGroups/Api-Default-West-US/providers/Microsoft.ApiManagement/service/contoso -Url 'https://contoso.com/awesomeapi' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is another example where the protocol doesn't match the type of URL that is provided. My thought is the value for -Protocol in this example should be HTTPS so that it matches the type of URL.
Modifies an API Management diagnostic at the Global or Api scope. (autogenerated) | ||
|
||
```powershell <!-- Aladdin Generated Example --> | ||
Set-AzApiManagementDiagnostic -AlwaysLog allErrors -ApiId '0001' -Context <PsApiManagementContext> -DiagnosticId 'applicationinsights' -LoggerId 'Logger123' -SamplingSetting <PsApiManagementSamplingSetting> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the value for -AlwaysLog be in the case it tab expands to? For example, AllErrors.
Modifies an API Management Logger. (autogenerated) | ||
|
||
```powershell <!-- Aladdin Generated Example --> | ||
Set-AzApiManagementLogger -Confirm -Context <PsApiManagementContext> -InstrumentationKey <String> -LoggerId 'Logger123' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious to know why we're using the -Confirm parameter in this example? are risk mitigation parameters. My thought is that we should omit -Confirm and -WhatIf in our examples unless there's a specific reason for them.