Skip to content

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

Merged

Conversation

aladdindoc
Copy link
Contributor

  • Add Aladdin crafted examples.

…erviceBus

	- Add new examples to the following modules:
		ApiManagement
		DevTestLabs
		EventHub
		LogicApp
		ServiceBus
@adxsdkps
Copy link
Collaborator

adxsdkps commented Jun 4, 2020

Can one of the admins verify this patch?

@VeryEarly VeryEarly self-assigned this Jun 5, 2020
@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@VeryEarly VeryEarly closed this Jun 8, 2020
@VeryEarly VeryEarly reopened this Jun 8, 2020
@VeryEarly
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@VeryEarly VeryEarly merged commit c7f9a8a into Azure:master Jun 9, 2020
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'
Copy link
Contributor

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'
Copy link
Contributor

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'
Copy link
Contributor

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>
Copy link
Contributor

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'
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants