From 670f3f96c3d85dd88888dd401e9099174ef41362 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 4 Dec 2018 07:26:23 +0000 Subject: [PATCH] Generated from b2942f357046a206ce8895f555a1e9f4071402a9 correct casing --- .../apimanagement/apimanagementapi/models.go | 1 + .../mgmt/apimanagement/models.go | 30 +++ .../apimanagement/apimanagementapi/models.go | 1 + .../mgmt/apimanagement/models.go | 39 +++- .../mgmt/2016-07-07/apimanagement/models.go | 16 +- .../mgmt/2016-07-07/apimanagement/property.go | 2 +- .../mgmt/2016-07-07/apimanagement/reports.go | 2 +- .../2016-07-07/apimanagement/subscriptions.go | 2 +- .../mgmt/2016-10-10/apimanagement/models.go | 14 +- .../mgmt/2016-10-10/apimanagement/property.go | 2 +- .../mgmt/2016-10-10/apimanagement/reports.go | 2 +- .../2016-10-10/apimanagement/subscriptions.go | 2 +- .../apimanagement/diagnosticlogger.go | 4 +- .../mgmt/2017-03-01/apimanagement/models.go | 20 +- .../mgmt/2017-03-01/apimanagement/property.go | 2 +- .../mgmt/2017-03-01/apimanagement/reports.go | 4 +- .../2017-03-01/apimanagement/subscription.go | 2 +- .../apimanagement/tagdescription.go | 2 +- .../apimanagement/apidiagnosticlogger.go | 4 +- .../mgmt/2018-01-01/apimanagement/apiissue.go | 2 +- .../apimanagement/apiissueattachment.go | 2 +- .../apimanagement/apiissuecomment.go | 2 +- .../apimanagementapi/interfaces.go | 7 + .../apimanagement/diagnosticlogger.go | 4 +- .../mgmt/2018-01-01/apimanagement/models.go | 211 ++++++++++++++++- .../mgmt/2018-01-01/apimanagement/property.go | 2 +- .../mgmt/2018-01-01/apimanagement/reports.go | 4 +- .../2018-01-01/apimanagement/serviceskus.go | 165 +++++++++++++ .../2018-01-01/apimanagement/subscription.go | 2 +- .../apimanagement/tagdescription.go | 2 +- .../apimanagement/apiissue.go | 2 +- .../apimanagement/apiissueattachment.go | 2 +- .../apimanagement/apiissuecomment.go | 2 +- .../apimanagementapi/interfaces.go | 7 + .../apimanagement/models.go | 219 ++++++++++++++++-- .../apimanagement/property.go | 2 +- .../apimanagement/reports.go | 4 +- .../apimanagement/serviceskus.go | 165 +++++++++++++ .../apimanagement/subscription.go | 2 +- .../apimanagement/tagdescription.go | 2 +- 40 files changed, 876 insertions(+), 85 deletions(-) create mode 100644 services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go create mode 100644 services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go diff --git a/profiles/preview/apimanagement/mgmt/apimanagement/apimanagementapi/models.go b/profiles/preview/apimanagement/mgmt/apimanagement/apimanagementapi/models.go index edccbadf0837..c4668dba6535 100644 --- a/profiles/preview/apimanagement/mgmt/apimanagement/apimanagementapi/models.go +++ b/profiles/preview/apimanagement/mgmt/apimanagement/apimanagementapi/models.go @@ -67,6 +67,7 @@ type QuotaByPeriodKeysClientAPI = original.QuotaByPeriodKeysClientAPI type RegionsClientAPI = original.RegionsClientAPI type ReportsClientAPI = original.ReportsClientAPI type ServiceClientAPI = original.ServiceClientAPI +type ServiceSkusClientAPI = original.ServiceSkusClientAPI type SignInSettingsClientAPI = original.SignInSettingsClientAPI type SignUpSettingsClientAPI = original.SignUpSettingsClientAPI type SubscriptionClientAPI = original.SubscriptionClientAPI diff --git a/profiles/preview/apimanagement/mgmt/apimanagement/models.go b/profiles/preview/apimanagement/mgmt/apimanagement/models.go index be0b3cb3f1c8..edb89d47ea66 100644 --- a/profiles/preview/apimanagement/mgmt/apimanagement/models.go +++ b/profiles/preview/apimanagement/mgmt/apimanagement/models.go @@ -224,6 +224,14 @@ const ( ProtocolHTTPS Protocol = original.ProtocolHTTPS ) +type ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleType + +const ( + Automatic ResourceSkuCapacityScaleType = original.Automatic + Manual ResourceSkuCapacityScaleType = original.Manual + None ResourceSkuCapacityScaleType = original.None +) + type SkuType = original.SkuType const ( @@ -587,6 +595,12 @@ type RequestContract = original.RequestContract type RequestReportCollection = original.RequestReportCollection type RequestReportRecordContract = original.RequestReportRecordContract type Resource = original.Resource +type ResourceSku = original.ResourceSku +type ResourceSkuCapacity = original.ResourceSkuCapacity +type ResourceSkuResult = original.ResourceSkuResult +type ResourceSkuResults = original.ResourceSkuResults +type ResourceSkuResultsIterator = original.ResourceSkuResultsIterator +type ResourceSkuResultsPage = original.ResourceSkuResultsPage type ResponseContract = original.ResponseContract type SaveConfigurationParameter = original.SaveConfigurationParameter type SchemaCollection = original.SchemaCollection @@ -613,6 +627,7 @@ type ServiceProperties = original.ServiceProperties type ServiceResource = original.ServiceResource type ServiceRestoreFuture = original.ServiceRestoreFuture type ServiceSkuProperties = original.ServiceSkuProperties +type ServiceSkusClient = original.ServiceSkusClient type ServiceUpdateFuture = original.ServiceUpdateFuture type ServiceUpdateHostnameFuture = original.ServiceUpdateHostnameFuture type ServiceUpdateHostnameParameters = original.ServiceUpdateHostnameParameters @@ -1097,6 +1112,12 @@ func NewReportsClient(subscriptionID string) ReportsClient { func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return original.NewReportsClientWithBaseURI(baseURI, subscriptionID) } +func NewResourceSkuResultsIterator(page ResourceSkuResultsPage) ResourceSkuResultsIterator { + return original.NewResourceSkuResultsIterator(page) +} +func NewResourceSkuResultsPage(getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage { + return original.NewResourceSkuResultsPage(getNextPage) +} func NewSchemaCollectionIterator(page SchemaCollectionPage) SchemaCollectionIterator { return original.NewSchemaCollectionIterator(page) } @@ -1115,6 +1136,12 @@ func NewServiceListResultIterator(page ServiceListResultPage) ServiceListResultI func NewServiceListResultPage(getNextPage func(context.Context, ServiceListResult) (ServiceListResult, error)) ServiceListResultPage { return original.NewServiceListResultPage(getNextPage) } +func NewServiceSkusClient(subscriptionID string) ServiceSkusClient { + return original.NewServiceSkusClient(subscriptionID) +} +func NewServiceSkusClientWithBaseURI(baseURI string, subscriptionID string) ServiceSkusClient { + return original.NewServiceSkusClientWithBaseURI(baseURI, subscriptionID) +} func NewSignInSettingsClient(subscriptionID string) SignInSettingsClient { return original.NewSignInSettingsClient(subscriptionID) } @@ -1301,6 +1328,9 @@ func PossibleProductStateValues() []ProductState { func PossibleProtocolValues() []Protocol { return original.PossibleProtocolValues() } +func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { + return original.PossibleResourceSkuCapacityScaleTypeValues() +} func PossibleSkuTypeValues() []SkuType { return original.PossibleSkuTypeValues() } diff --git a/profiles/preview/preview/apimanagement/mgmt/apimanagement/apimanagementapi/models.go b/profiles/preview/preview/apimanagement/mgmt/apimanagement/apimanagementapi/models.go index 2427ea766706..0e3a6e58ec72 100644 --- a/profiles/preview/preview/apimanagement/mgmt/apimanagement/apimanagementapi/models.go +++ b/profiles/preview/preview/apimanagement/mgmt/apimanagement/apimanagementapi/models.go @@ -65,6 +65,7 @@ type QuotaByPeriodKeysClientAPI = original.QuotaByPeriodKeysClientAPI type RegionsClientAPI = original.RegionsClientAPI type ReportsClientAPI = original.ReportsClientAPI type ServiceClientAPI = original.ServiceClientAPI +type ServiceSkusClientAPI = original.ServiceSkusClientAPI type SignInSettingsClientAPI = original.SignInSettingsClientAPI type SignUpSettingsClientAPI = original.SignUpSettingsClientAPI type SubscriptionClientAPI = original.SubscriptionClientAPI diff --git a/profiles/preview/preview/apimanagement/mgmt/apimanagement/models.go b/profiles/preview/preview/apimanagement/mgmt/apimanagement/models.go index 552ac7a4264f..12f4da35193e 100644 --- a/profiles/preview/preview/apimanagement/mgmt/apimanagement/models.go +++ b/profiles/preview/preview/apimanagement/mgmt/apimanagement/models.go @@ -230,6 +230,14 @@ const ( ProtocolHTTPS Protocol = original.ProtocolHTTPS ) +type ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleType + +const ( + Automatic ResourceSkuCapacityScaleType = original.Automatic + Manual ResourceSkuCapacityScaleType = original.Manual + None ResourceSkuCapacityScaleType = original.None +) + type SamplingType = original.SamplingType const ( @@ -239,10 +247,11 @@ const ( type SkuType = original.SkuType const ( - SkuTypeBasic SkuType = original.SkuTypeBasic - SkuTypeDeveloper SkuType = original.SkuTypeDeveloper - SkuTypePremium SkuType = original.SkuTypePremium - SkuTypeStandard SkuType = original.SkuTypeStandard + SkuTypeBasic SkuType = original.SkuTypeBasic + SkuTypeConsumption SkuType = original.SkuTypeConsumption + SkuTypeDeveloper SkuType = original.SkuTypeDeveloper + SkuTypePremium SkuType = original.SkuTypePremium + SkuTypeStandard SkuType = original.SkuTypeStandard ) type SoapAPIType = original.SoapAPIType @@ -600,6 +609,12 @@ type RequestContract = original.RequestContract type RequestReportCollection = original.RequestReportCollection type RequestReportRecordContract = original.RequestReportRecordContract type Resource = original.Resource +type ResourceSku = original.ResourceSku +type ResourceSkuCapacity = original.ResourceSkuCapacity +type ResourceSkuResult = original.ResourceSkuResult +type ResourceSkuResults = original.ResourceSkuResults +type ResourceSkuResultsIterator = original.ResourceSkuResultsIterator +type ResourceSkuResultsPage = original.ResourceSkuResultsPage type ResponseContract = original.ResponseContract type SamplingSettings = original.SamplingSettings type SaveConfigurationParameter = original.SaveConfigurationParameter @@ -627,6 +642,7 @@ type ServiceProperties = original.ServiceProperties type ServiceResource = original.ServiceResource type ServiceRestoreFuture = original.ServiceRestoreFuture type ServiceSkuProperties = original.ServiceSkuProperties +type ServiceSkusClient = original.ServiceSkusClient type ServiceUpdateFuture = original.ServiceUpdateFuture type ServiceUpdateHostnameFuture = original.ServiceUpdateHostnameFuture type ServiceUpdateHostnameParameters = original.ServiceUpdateHostnameParameters @@ -1099,6 +1115,12 @@ func NewReportsClient(subscriptionID string) ReportsClient { func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return original.NewReportsClientWithBaseURI(baseURI, subscriptionID) } +func NewResourceSkuResultsIterator(page ResourceSkuResultsPage) ResourceSkuResultsIterator { + return original.NewResourceSkuResultsIterator(page) +} +func NewResourceSkuResultsPage(getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage { + return original.NewResourceSkuResultsPage(getNextPage) +} func NewSchemaCollectionIterator(page SchemaCollectionPage) SchemaCollectionIterator { return original.NewSchemaCollectionIterator(page) } @@ -1117,6 +1139,12 @@ func NewServiceListResultIterator(page ServiceListResultPage) ServiceListResultI func NewServiceListResultPage(getNextPage func(context.Context, ServiceListResult) (ServiceListResult, error)) ServiceListResultPage { return original.NewServiceListResultPage(getNextPage) } +func NewServiceSkusClient(subscriptionID string) ServiceSkusClient { + return original.NewServiceSkusClient(subscriptionID) +} +func NewServiceSkusClientWithBaseURI(baseURI string, subscriptionID string) ServiceSkusClient { + return original.NewServiceSkusClientWithBaseURI(baseURI, subscriptionID) +} func NewSignInSettingsClient(subscriptionID string) SignInSettingsClient { return original.NewSignInSettingsClient(subscriptionID) } @@ -1306,6 +1334,9 @@ func PossibleProductStateValues() []ProductState { func PossibleProtocolValues() []Protocol { return original.PossibleProtocolValues() } +func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { + return original.PossibleResourceSkuCapacityScaleTypeValues() +} func PossibleSamplingTypeValues() []SamplingType { return original.PossibleSamplingTypeValues() } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/models.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/models.go index 5bcd7184a4cd..1c5fd217f754 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/models.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/models.go @@ -1325,7 +1325,7 @@ func NewGroupCollectionPage(getNextPage func(context.Context, GroupCollection) ( // GroupContract developer group. type GroupContract struct { autorest.Response `json:"-"` - // ID - Uniquely identifies the group within the current API Management service instance. The value is a valid relative URL in the format of /groups/{groupid} where {groupid} is a group identifier. + // ID - Uniquely identifies the group within the current API Management service instance. The value is a valid relative URL in the format of /groups/{groupId} where {groupId} is a group identifier. ID *string `json:"id,omitempty"` // Name - Group name. Name *string `json:"name,omitempty"` @@ -2738,7 +2738,7 @@ type ReportRecordContract struct { Name *string `json:"name,omitempty"` // Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. Timestamp *date.Time `json:"timestamp,omitempty"` - // Interval - Length of agregation period. + // Interval - Length of aggregation period. Interval *int64 `json:"interval,omitempty"` // Country - Country to which this record data is related. Country *string `json:"country,omitempty"` @@ -2758,7 +2758,7 @@ type ReportRecordContract struct { APIRegion *string `json:"apiRegion,omitempty"` // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId} SubscriptionID *string `json:"subscriptionId,omitempty"` - // CallCountSuccess - Number of succesful calls. + // CallCountSuccess - Number of successful calls. CallCountSuccess *int32 `json:"callCountSuccess,omitempty"` // CallCountBlocked - Number of calls blocked due to invalid credentials. CallCountBlocked *int32 `json:"callCountBlocked,omitempty"` @@ -3077,7 +3077,7 @@ type ServiceManageDeploymentsParameters struct { AdditionalLocations *[]AdditionalRegion `json:"additionalLocations,omitempty"` // VpnConfiguration - Virtual network configuration. VpnConfiguration *VirtualNetworkConfiguration `json:"vpnConfiguration,omitempty"` - // VpnType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that the API Management service deployment is set up inside a Virtual Network having an Intranet Facing Endpoint only. When vpnConfiguration is specified, vpnType must be specified. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VpnType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that the API Management service deployment is set up inside a Virtual Network having an Intranet Facing Endpoint only. When vpnConfiguration is specified, vpnType must be specified. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VpnType VirtualNetworkType `json:"vpnType,omitempty"` } @@ -3124,7 +3124,7 @@ type ServiceProperties struct { AdditionalLocations *[]AdditionalRegion `json:"additionalLocations,omitempty"` // CustomProperties - Custom properties of the API Management service, like disabling TLS 1.0. CustomProperties map[string]*string `json:"customProperties"` - // VpnType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VpnType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VpnType VirtualNetworkType `json:"vpnType,omitempty"` } @@ -3411,7 +3411,7 @@ type SetObject struct { Value interface{} `json:"value,omitempty"` } -// SubscriptionCollection paged Subsctions list representation. +// SubscriptionCollection paged Subscriptions list representation. type SubscriptionCollection struct { autorest.Response `json:"-"` // Value - Page values. @@ -3594,7 +3594,7 @@ type SubscriptionContract struct { type SubscriptionCreateParameters struct { // UserID - User (user id path) for whom subscription is being created in form /users/{uid} UserID *string `json:"userId,omitempty"` - // ProductID - Product (product id path) for which subscription is being created in form /products/{productid} + // ProductID - Product (product id path) for which subscription is being created in form /products/{productId} ProductID *string `json:"productId,omitempty"` // Name - Subscription name. Name *string `json:"name,omitempty"` @@ -3977,7 +3977,7 @@ type VirtualNetworkConfiguration struct { Vnetid *string `json:"vnetid,omitempty"` // Subnetname - The name of the subnet. Subnetname *string `json:"subnetname,omitempty"` - // SubnetResourceID - The name of the subnet Resource ID. This has format /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/{virtual network name}/subnets/{subnet name}. + // SubnetResourceID - The name of the subnet Resource ID. This has format /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/{virtual network name}/subnets/{subnet name}. SubnetResourceID *string `json:"subnetResourceId,omitempty"` // Location - The location of the virtual network. Location *string `json:"location,omitempty"` diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go index 52ff8e25a89f..282e097e1bcd 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go @@ -145,7 +145,7 @@ func (client PropertyClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete deletes specific property from the the API Management service instance. +// Delete deletes specific property from the API Management service instance. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go index 59b83385874b..52ee1aee8819 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go @@ -52,7 +52,7 @@ func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsC // interval - by time interval. This value is only applicable to ByTime aggregation. Interval must be multiple // of 15 minutes and may not be zero. The value should be in ISO 8601 format // (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimSpan to a valid -// interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) +// interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) func (client ReportsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, aggregation ReportsAggregation, filter string, top *int32, skip *int32, interval string) (result ReportCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByService") diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go index edd1b76fffa0..1ca5ff921e01 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go @@ -645,7 +645,7 @@ func (client SubscriptionsClient) RegenerateSecondaryKeyResponder(resp *http.Res return } -// Update updates the details of a subscription specificied by its identifier. +// Update updates the details of a subscription specified by its identifier. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/models.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/models.go index c6a7ecafb8b1..67480f82f475 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/models.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/models.go @@ -1806,7 +1806,7 @@ func NewGroupCollectionPage(getNextPage func(context.Context, GroupCollection) ( // GroupContract developer group. type GroupContract struct { autorest.Response `json:"-"` - // ID - Uniquely identifies the group within the current API Management service instance. The value is a valid relative URL in the format of /groups/{groupid} where {groupid} is a group identifier. + // ID - Uniquely identifies the group within the current API Management service instance. The value is a valid relative URL in the format of /groups/{groupId} where {groupId} is a group identifier. ID *string `json:"id,omitempty"` // Name - Group name. Name *string `json:"name,omitempty"` @@ -3422,7 +3422,7 @@ type ReportRecordContract struct { Name *string `json:"name,omitempty"` // Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. Timestamp *date.Time `json:"timestamp,omitempty"` - // Interval - Length of agregation period. + // Interval - Length of aggregation period. Interval *int64 `json:"interval,omitempty"` // Country - Country to which this record data is related. Country *string `json:"country,omitempty"` @@ -3442,9 +3442,9 @@ type ReportRecordContract struct { APIRegion *string `json:"apiRegion,omitempty"` // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId} SubscriptionID *string `json:"subscriptionId,omitempty"` - // CallCountSuccess - Number of succesful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect + // CallCountSuccess - Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect CallCountSuccess *int32 `json:"callCountSuccess,omitempty"` - // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests CallCountBlocked *int32 `json:"callCountBlocked,omitempty"` // CallCountFailed - Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 CallCountFailed *int32 `json:"callCountFailed,omitempty"` @@ -3729,7 +3729,7 @@ type ServiceManageDeploymentsParameters struct { AdditionalLocations *[]AdditionalRegion `json:"additionalLocations,omitempty"` // VpnConfiguration - Virtual network configuration. VpnConfiguration *VirtualNetworkConfiguration `json:"vpnConfiguration,omitempty"` - // VpnType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that the API Management service deployment is set up inside a Virtual Network having an Intranet Facing Endpoint only. When vpnConfiguration is specified, vpnType must be specified. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VpnType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that the API Management service deployment is set up inside a Virtual Network having an Intranet Facing Endpoint only. When vpnConfiguration is specified, vpnType must be specified. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VpnType VirtualNetworkType `json:"vpnType,omitempty"` } @@ -3776,7 +3776,7 @@ type ServiceProperties struct { AdditionalLocations *[]AdditionalRegion `json:"additionalLocations,omitempty"` // CustomProperties - Custom properties of the API Management service, like disabling TLS 1.0. CustomProperties map[string]*string `json:"customProperties"` - // VpnType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VpnType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VpnType VirtualNetworkType `json:"vpnType,omitempty"` } @@ -4423,7 +4423,7 @@ type SubscriptionContract struct { type SubscriptionCreateParameters struct { // UserID - User (user id path) for whom subscription is being created in form /users/{uid} UserID *string `json:"userId,omitempty"` - // ProductID - Product (product id path) for which subscription is being created in form /products/{productid} + // ProductID - Product (product id path) for which subscription is being created in form /products/{productId} ProductID *string `json:"productId,omitempty"` // Name - Subscription name. Name *string `json:"name,omitempty"` diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/property.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/property.go index abc27ff09fe3..40fe3190003a 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/property.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/property.go @@ -145,7 +145,7 @@ func (client PropertyClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete deletes specific property from the the API Management service instance. +// Delete deletes specific property from the API Management service instance. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go index 4363458ae918..fa93f52565c2 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go @@ -52,7 +52,7 @@ func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsC // interval - by time interval. This value is only applicable to ByTime aggregation. Interval must be multiple // of 15 minutes and may not be zero. The value should be in ISO 8601 format // (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimSpan to a valid -// interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) +// interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) func (client ReportsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, aggregation ReportsAggregation, filter string, top *int32, skip *int32, interval *string) (result ReportCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByService") diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go index 56e84a31f063..b639483de351 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go @@ -661,7 +661,7 @@ func (client SubscriptionsClient) RegenerateSecondaryKeyResponder(resp *http.Res return } -// Update updates the details of a subscription specificied by its identifier. +// Update updates the details of a subscription specified by its identifier. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go index 59ad83f13132..9ee7681d2c29 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go @@ -136,7 +136,7 @@ func (client DiagnosticLoggerClient) CheckEntityExistsResponder(resp *http.Respo return } -// CreateOrUpdate attaches a logger to a dignostic. +// CreateOrUpdate attaches a logger to a diagnostic. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -327,7 +327,7 @@ func (client DiagnosticLoggerClient) DeleteResponder(resp *http.Response) (resul return } -// ListByService lists all loggers assosiated with the specified Diagnostic of the API Management service instance. +// ListByService lists all loggers associated with the specified Diagnostic of the API Management service instance. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/models.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/models.go index 7c7045bdb7fe..f098e525c725 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/models.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/models.go @@ -5257,7 +5257,7 @@ func (lcp LoggerContractProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// LoggerSamplingContract sampling settigs contract. +// LoggerSamplingContract sampling settings contract. type LoggerSamplingContract struct { // LoggerSamplingProperties - Sampling settings entity contract properties. *LoggerSamplingProperties `json:"properties,omitempty"` @@ -8039,7 +8039,7 @@ type ReportRecordContract struct { Name *string `json:"name,omitempty"` // Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. Timestamp *date.Time `json:"timestamp,omitempty"` - // Interval - Length of agregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + // Interval - Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). Interval *string `json:"interval,omitempty"` // Country - Country to which this record data is related. Country *string `json:"country,omitempty"` @@ -8059,9 +8059,9 @@ type ReportRecordContract struct { APIRegion *string `json:"apiRegion,omitempty"` // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId} SubscriptionID *string `json:"subscriptionId,omitempty"` - // CallCountSuccess - Number of succesful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect + // CallCountSuccess - Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect CallCountSuccess *int32 `json:"callCountSuccess,omitempty"` - // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests CallCountBlocked *int32 `json:"callCountBlocked,omitempty"` // CallCountFailed - Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 CallCountFailed *int32 `json:"callCountFailed,omitempty"` @@ -8148,7 +8148,7 @@ type RequestReportRecordContract struct { ResponseSize *int32 `json:"responseSize,omitempty"` // Timestamp - The date and time when this request was received by the gateway in ISO 8601 format. Timestamp *date.Time `json:"timestamp,omitempty"` - // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fullfilled by the backend. + // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. Cache *string `json:"cache,omitempty"` // APITime - The total time it took to process this request. APITime *float64 `json:"apiTime,omitempty"` @@ -8591,7 +8591,7 @@ type ServiceBaseProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -8894,7 +8894,7 @@ type ServiceProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -9386,7 +9386,7 @@ type ServiceUpdateProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -9721,7 +9721,7 @@ type SubscriptionContractProperties struct { type SubscriptionCreateParameterProperties struct { // UserID - User (user id path) for whom subscription is being created in form /users/{uid} UserID *string `json:"userId,omitempty"` - // ProductID - Product (product id path) for which subscription is being created in form /products/{productid} + // ProductID - Product (product id path) for which subscription is being created in form /products/{productId} ProductID *string `json:"productId,omitempty"` // DisplayName - Subscription name. DisplayName *string `json:"displayName,omitempty"` @@ -10758,7 +10758,7 @@ type TermsOfServiceProperties struct { Text *string `json:"text,omitempty"` // Enabled - Display terms of service during a sign-up process. Enabled *bool `json:"enabled,omitempty"` - // ConsentRequired - Ask user for concent. + // ConsentRequired - Ask user for consent. ConsentRequired *bool `json:"consentRequired,omitempty"` } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go index 67ecd742f049..4a31d5ad8483 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go @@ -146,7 +146,7 @@ func (client PropertyClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete deletes specific property from the the API Management service instance. +// Delete deletes specific property from the API Management service instance. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go index d89ab416e297..b07f66bc4930 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go @@ -180,7 +180,7 @@ func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroup return } -// ListByGeo lists report records by GeoGraphy. +// ListByGeo lists report records by geography. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -847,7 +847,7 @@ func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, reso // serviceName - the name of the API Management service. // interval - by time interval. Interval must be multiple of 15 minutes and may not be zero. The value should // be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert -// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) +// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) // filter - the filter to apply on the operation. // top - number of records to return. // skip - number of records to skip. diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go index 737528fa7693..b342a4ea465c 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go @@ -754,7 +754,7 @@ func (client SubscriptionClient) RegenerateSecondaryKeyResponder(resp *http.Resp return } -// Update updates the details of a subscription specificied by its identifier. +// Update updates the details of a subscription specified by its identifier. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go index b7768d193f12..7131709dc293 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go @@ -41,7 +41,7 @@ func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) T return TagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create/Update tag fescription in scope of the Api. +// CreateOrUpdate create/Update tag description in scope of the Api. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go index b2275d6a34d8..39adb12ed735 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go @@ -142,7 +142,7 @@ func (client APIDiagnosticLoggerClient) CheckEntityExistsResponder(resp *http.Re return } -// CreateOrUpdate attaches a logger to a dignostic for an API. +// CreateOrUpdate attaches a logger to a diagnostic for an API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -345,7 +345,7 @@ func (client APIDiagnosticLoggerClient) DeleteResponder(resp *http.Response) (re return } -// ListByService lists all loggers assosiated with the specified Diagnostic of an API. +// ListByService lists all loggers associated with the specified Diagnostic of an API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go index a021791d3313..518bf144696e 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go @@ -445,7 +445,7 @@ func (client APIIssueClient) GetEntityTagResponder(resp *http.Response) (result return } -// ListByService lists all issues assosiated with the specified API. +// ListByService lists all issues associated with the specified API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go index e113e8042e88..29a371da081f 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go @@ -469,7 +469,7 @@ func (client APIIssueAttachmentClient) GetEntityTagResponder(resp *http.Response return } -// ListByService lists all comments for the Issue assosiated with the specified API. +// ListByService lists all comments for the Issue associated with the specified API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go index f843401e4333..25bfa4cf393f 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go @@ -468,7 +468,7 @@ func (client APIIssueCommentClient) GetEntityTagResponder(resp *http.Response) ( return } -// ListByService lists all comments for the Issue assosiated with the specified API. +// ListByService lists all comments for the Issue associated with the specified API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apimanagementapi/interfaces.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apimanagementapi/interfaces.go index 455582740838..862c665287d5 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apimanagementapi/interfaces.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apimanagementapi/interfaces.go @@ -231,6 +231,13 @@ type OperationsClientAPI interface { var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) +// ServiceSkusClientAPI contains the set of methods on the ServiceSkusClient type. +type ServiceSkusClientAPI interface { + ListAvailableServiceSkus(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ResourceSkuResultsPage, err error) +} + +var _ ServiceSkusClientAPI = (*apimanagement.ServiceSkusClient)(nil) + // ServiceClientAPI contains the set of methods on the ServiceClient type. type ServiceClientAPI interface { ApplyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, parameters *apimanagement.ServiceApplyNetworkConfigurationParameters) (result apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture, err error) diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go index ae70691ff46f..45d6f3b4e6a4 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go @@ -136,7 +136,7 @@ func (client DiagnosticLoggerClient) CheckEntityExistsResponder(resp *http.Respo return } -// CreateOrUpdate attaches a logger to a dignostic. +// CreateOrUpdate attaches a logger to a diagnostic. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -327,7 +327,7 @@ func (client DiagnosticLoggerClient) DeleteResponder(resp *http.Response) (resul return } -// ListByService lists all loggers assosiated with the specified Diagnostic of the API Management service instance. +// ListByService lists all loggers associated with the specified Diagnostic of the API Management service instance. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/models.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/models.go index 44664c98b672..55a88944bbe1 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/models.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/models.go @@ -457,6 +457,23 @@ func PossibleProtocolValues() []Protocol { return []Protocol{ProtocolHTTP, ProtocolHTTPS} } +// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type. +type ResourceSkuCapacityScaleType string + +const ( + // Automatic ... + Automatic ResourceSkuCapacityScaleType = "automatic" + // Manual ... + Manual ResourceSkuCapacityScaleType = "manual" + // None ... + None ResourceSkuCapacityScaleType = "none" +) + +// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type. +func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { + return []ResourceSkuCapacityScaleType{Automatic, Manual, None} +} + // SkuType enumerates the values for sku type. type SkuType string @@ -2788,7 +2805,7 @@ func (brc *BackendReconnectContract) UnmarshalJSON(body []byte) error { // BackendReconnectProperties properties to control reconnect requests. type BackendReconnectProperties struct { - // After - Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconect is PT2M. + // After - Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. After *string `json:"after,omitempty"` } @@ -3028,7 +3045,7 @@ type CertificateConfiguration struct { EncodedCertificate *string `json:"encodedCertificate,omitempty"` // CertificatePassword - Certificate Password. CertificatePassword *string `json:"certificatePassword,omitempty"` - // StoreName - The System.Security.Cryptography.x509certificates.Storename certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root' + // StoreName - The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root' StoreName StoreName `json:"storeName,omitempty"` // Certificate - Certificate information. Certificate *CertificateInformation `json:"certificate,omitempty"` @@ -8389,7 +8406,7 @@ type ReportRecordContract struct { Name *string `json:"name,omitempty"` // Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. Timestamp *date.Time `json:"timestamp,omitempty"` - // Interval - Length of agregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + // Interval - Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). Interval *string `json:"interval,omitempty"` // Country - Country to which this record data is related. Country *string `json:"country,omitempty"` @@ -8409,9 +8426,9 @@ type ReportRecordContract struct { APIRegion *string `json:"apiRegion,omitempty"` // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId} SubscriptionID *string `json:"subscriptionId,omitempty"` - // CallCountSuccess - Number of succesful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect + // CallCountSuccess - Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect CallCountSuccess *int32 `json:"callCountSuccess,omitempty"` - // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests CallCountBlocked *int32 `json:"callCountBlocked,omitempty"` // CallCountFailed - Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 CallCountFailed *int32 `json:"callCountFailed,omitempty"` @@ -8498,7 +8515,7 @@ type RequestReportRecordContract struct { ResponseSize *int32 `json:"responseSize,omitempty"` // Timestamp - The date and time when this request was received by the gateway in ISO 8601 format. Timestamp *date.Time `json:"timestamp,omitempty"` - // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fullfilled by the backend. + // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. Cache *string `json:"cache,omitempty"` // APITime - The total time it took to process this request. APITime *float64 `json:"apiTime,omitempty"` @@ -8524,6 +8541,180 @@ type Resource struct { Type *string `json:"type,omitempty"` } +// ResourceSku describes an available API Management SKU. +type ResourceSku struct { + // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic' + Name SkuType `json:"name,omitempty"` +} + +// ResourceSkuCapacity describes scaling information of a SKU. +type ResourceSkuCapacity struct { + // Minimum - The minimum capacity. + Minimum *int32 `json:"minimum,omitempty"` + // Maximum - The maximum capacity that can be set. + Maximum *int32 `json:"maximum,omitempty"` + // Default - The default capacity. + Default *int32 `json:"default,omitempty"` + // ScaleType - The scale type applicable to the sku. Possible values include: 'Automatic', 'Manual', 'None' + ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` +} + +// ResourceSkuResult describes an available API Management service SKU. +type ResourceSkuResult struct { + // ResourceType - The type of resource the SKU applies to. + ResourceType *string `json:"resourceType,omitempty"` + // Sku - Specifies API Management SKU. + Sku *ResourceSku `json:"sku,omitempty"` + // Capacity - Specifies the number of API Management units. + Capacity *ResourceSkuCapacity `json:"capacity,omitempty"` +} + +// ResourceSkuResults the API Management service SKUs operation response. +type ResourceSkuResults struct { + autorest.Response `json:"-"` + // Value - The list of skus available for the service. + Value *[]ResourceSkuResult `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of API Management service Skus. + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceSkuResultsIterator provides access to a complete listing of ResourceSkuResult values. +type ResourceSkuResultsIterator struct { + i int + page ResourceSkuResultsPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ResourceSkuResultsIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ResourceSkuResultsIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceSkuResultsIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ResourceSkuResultsIterator) Response() ResourceSkuResults { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ResourceSkuResultsIterator) Value() ResourceSkuResult { + if !iter.page.NotDone() { + return ResourceSkuResult{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceSkuResultsIterator type. +func NewResourceSkuResultsIterator(page ResourceSkuResultsPage) ResourceSkuResultsIterator { + return ResourceSkuResultsIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rsr ResourceSkuResults) IsEmpty() bool { + return rsr.Value == nil || len(*rsr.Value) == 0 +} + +// resourceSkuResultsPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rsr ResourceSkuResults) resourceSkuResultsPreparer(ctx context.Context) (*http.Request, error) { + if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rsr.NextLink))) +} + +// ResourceSkuResultsPage contains a page of ResourceSkuResult values. +type ResourceSkuResultsPage struct { + fn func(context.Context, ResourceSkuResults) (ResourceSkuResults, error) + rsr ResourceSkuResults +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ResourceSkuResultsPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rsr) + if err != nil { + return err + } + page.rsr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ResourceSkuResultsPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceSkuResultsPage) NotDone() bool { + return !page.rsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceSkuResultsPage) Response() ResourceSkuResults { + return page.rsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceSkuResultsPage) Values() []ResourceSkuResult { + if page.rsr.IsEmpty() { + return nil + } + return *page.rsr.Value +} + +// Creates a new instance of the ResourceSkuResultsPage type. +func NewResourceSkuResultsPage(getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage { + return ResourceSkuResultsPage{fn: getNextPage} +} + // ResponseContract operation response details. type ResponseContract struct { // StatusCode - Operation response HTTP status code. @@ -8943,7 +9134,7 @@ type ServiceBaseProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -9251,7 +9442,7 @@ type ServiceProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -9748,7 +9939,7 @@ type ServiceUpdateProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -10086,7 +10277,7 @@ type SubscriptionContractProperties struct { type SubscriptionCreateParameterProperties struct { // UserID - User (user id path) for whom subscription is being created in form /users/{uid} UserID *string `json:"userId,omitempty"` - // ProductID - Product (product id path) for which subscription is being created in form /products/{productid} + // ProductID - Product (product id path) for which subscription is being created in form /products/{productId} ProductID *string `json:"productId,omitempty"` // DisplayName - Subscription name. DisplayName *string `json:"displayName,omitempty"` diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go index 7b9c9df4f7ee..9de3170f7817 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go @@ -151,7 +151,7 @@ func (client PropertyClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete deletes specific property from the the API Management service instance. +// Delete deletes specific property from the API Management service instance. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go index 5ccb3ae2dc97..214970f4baf3 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go @@ -180,7 +180,7 @@ func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroup return } -// ListByGeo lists report records by GeoGraphy. +// ListByGeo lists report records by geography. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -847,7 +847,7 @@ func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, reso // serviceName - the name of the API Management service. // interval - by time interval. Interval must be multiple of 15 minutes and may not be zero. The value should // be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert -// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) +// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) // filter - the filter to apply on the operation. // top - number of records to return. // skip - number of records to skip. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go new file mode 100644 index 000000000000..d7a6c2ae8778 --- /dev/null +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go @@ -0,0 +1,165 @@ +package apimanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ServiceSkusClient is the apiManagement Client +type ServiceSkusClient struct { + BaseClient +} + +// NewServiceSkusClient creates an instance of the ServiceSkusClient client. +func NewServiceSkusClient(subscriptionID string) ServiceSkusClient { + return NewServiceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client. +func NewServiceSkusClientWithBaseURI(baseURI string, subscriptionID string) ServiceSkusClient { + return ServiceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListAvailableServiceSkus gets all available SKU for a given API Management service +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +func (client ServiceSkusClient) ListAvailableServiceSkus(ctx context.Context, resourceGroupName string, serviceName string) (result ResourceSkuResultsPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkusClient.ListAvailableServiceSkus") + defer func() { + sc := -1 + if result.rsr.Response.Response != nil { + sc = result.rsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", err.Error()) + } + + result.fn = client.listAvailableServiceSkusNextResults + req, err := client.ListAvailableServiceSkusPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableServiceSkusSender(req) + if err != nil { + result.rsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", resp, "Failure sending request") + return + } + + result.rsr, err = client.ListAvailableServiceSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", resp, "Failure responding to request") + } + + return +} + +// ListAvailableServiceSkusPreparer prepares the ListAvailableServiceSkus request. +func (client ServiceSkusClient) ListAvailableServiceSkusPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableServiceSkusSender sends the ListAvailableServiceSkus request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceSkusClient) ListAvailableServiceSkusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableServiceSkusResponder handles the response to the ListAvailableServiceSkus request. The method always +// closes the http.Response Body. +func (client ServiceSkusClient) ListAvailableServiceSkusResponder(resp *http.Response) (result ResourceSkuResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAvailableServiceSkusNextResults retrieves the next set of results, if any. +func (client ServiceSkusClient) listAvailableServiceSkusNextResults(ctx context.Context, lastResults ResourceSkuResults) (result ResourceSkuResults, err error) { + req, err := lastResults.resourceSkuResultsPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAvailableServiceSkusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAvailableServiceSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAvailableServiceSkusComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServiceSkusClient) ListAvailableServiceSkusComplete(ctx context.Context, resourceGroupName string, serviceName string) (result ResourceSkuResultsIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkusClient.ListAvailableServiceSkus") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListAvailableServiceSkus(ctx, resourceGroupName, serviceName) + return +} diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go index d41f0b5f155e..77dfe38ae184 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go @@ -765,7 +765,7 @@ func (client SubscriptionClient) RegenerateSecondaryKeyResponder(resp *http.Resp return } -// Update updates the details of a subscription specificied by its identifier. +// Update updates the details of a subscription specified by its identifier. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go index d88a19115221..f740dfd5ae41 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go @@ -41,7 +41,7 @@ func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) T return TagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create/Update tag fescription in scope of the Api. +// CreateOrUpdate create/Update tag description in scope of the Api. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go index 8aacdb800a37..5e1f499c425a 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go @@ -445,7 +445,7 @@ func (client APIIssueClient) GetEntityTagResponder(resp *http.Response) (result return } -// ListByService lists all issues assosiated with the specified API. +// ListByService lists all issues associated with the specified API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go index 8a00e205b162..84a019968f90 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go @@ -469,7 +469,7 @@ func (client APIIssueAttachmentClient) GetEntityTagResponder(resp *http.Response return } -// ListByService lists all comments for the Issue assosiated with the specified API. +// ListByService lists all comments for the Issue associated with the specified API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go index fcda293b94c6..e556b5bd91ba 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go @@ -468,7 +468,7 @@ func (client APIIssueCommentClient) GetEntityTagResponder(resp *http.Response) ( return } -// ListByService lists all comments for the Issue assosiated with the specified API. +// ListByService lists all comments for the Issue associated with the specified API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apimanagementapi/interfaces.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apimanagementapi/interfaces.go index 33f2b230a42e..d2916ce84063 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apimanagementapi/interfaces.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apimanagementapi/interfaces.go @@ -221,6 +221,13 @@ type OperationsClientAPI interface { var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) +// ServiceSkusClientAPI contains the set of methods on the ServiceSkusClient type. +type ServiceSkusClientAPI interface { + ListAvailableServiceSkus(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ResourceSkuResultsPage, err error) +} + +var _ ServiceSkusClientAPI = (*apimanagement.ServiceSkusClient)(nil) + // ServiceClientAPI contains the set of methods on the ServiceClient type. type ServiceClientAPI interface { ApplyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, parameters *apimanagement.ServiceApplyNetworkConfigurationParameters) (result apimanagement.ServiceApplyNetworkConfigurationUpdatesFuture, err error) diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/models.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/models.go index bd6bfe9d7566..6636fce4c046 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/models.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/models.go @@ -470,6 +470,23 @@ func PossibleProtocolValues() []Protocol { return []Protocol{ProtocolHTTP, ProtocolHTTPS} } +// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type. +type ResourceSkuCapacityScaleType string + +const ( + // Automatic Supported scale type automatic. + Automatic ResourceSkuCapacityScaleType = "automatic" + // Manual Supported scale type manual. + Manual ResourceSkuCapacityScaleType = "manual" + // None Scaling not supported. + None ResourceSkuCapacityScaleType = "none" +) + +// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type. +func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { + return []ResourceSkuCapacityScaleType{Automatic, Manual, None} +} + // SamplingType enumerates the values for sampling type. type SamplingType string @@ -489,6 +506,8 @@ type SkuType string const ( // SkuTypeBasic Basic SKU of Api Management. SkuTypeBasic SkuType = "Basic" + // SkuTypeConsumption Consumption SKU of Api Management. + SkuTypeConsumption SkuType = "Consumption" // SkuTypeDeveloper Developer SKU of Api Management. SkuTypeDeveloper SkuType = "Developer" // SkuTypePremium Premium SKU of Api Management. @@ -499,7 +518,7 @@ const ( // PossibleSkuTypeValues returns an array of possible values for the SkuType const type. func PossibleSkuTypeValues() []SkuType { - return []SkuType{SkuTypeBasic, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard} + return []SkuType{SkuTypeBasic, SkuTypeConsumption, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard} } // SoapAPIType enumerates the values for soap api type. @@ -3070,7 +3089,7 @@ type CertificateConfiguration struct { EncodedCertificate *string `json:"encodedCertificate,omitempty"` // CertificatePassword - Certificate Password. CertificatePassword *string `json:"certificatePassword,omitempty"` - // StoreName - The System.Security.Cryptography.x509certificates.Storename certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root' + // StoreName - The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root' StoreName StoreName `json:"storeName,omitempty"` // Certificate - Certificate information. Certificate *CertificateInformation `json:"certificate,omitempty"` @@ -3491,9 +3510,9 @@ type DiagnosticContractProperties struct { LoggerID *string `json:"loggerId,omitempty"` // Sampling - Sampling settings for Diagnostic. Sampling *SamplingSettings `json:"sampling,omitempty"` - // Frontend - Diagnostic settings for incoming/outcoming HTTP messages to the Gateway. + // Frontend - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. Frontend *PipelineDiagnosticSettings `json:"frontend,omitempty"` - // Backend - Diagnostic settings for incoming/outcoming HTTP messages to the Backend + // Backend - Diagnostic settings for incoming/outgoing HTTP messages to the Backend Backend *PipelineDiagnosticSettings `json:"backend,omitempty"` // EnableHTTPCorrelationHeaders - Whether to process Correlation Headers coming to Api Management Service. Only applicable to Application Insights diagnostics. Default is true. EnableHTTPCorrelationHeaders *bool `json:"enableHttpCorrelationHeaders,omitempty"` @@ -6833,7 +6852,7 @@ type ParameterContract struct { Values *[]string `json:"values,omitempty"` } -// PipelineDiagnosticSettings diagnostic settings for incoming/outcoming HTTP messages to the Gateway. +// PipelineDiagnosticSettings diagnostic settings for incoming/outgoing HTTP messages to the Gateway. type PipelineDiagnosticSettings struct { // Request - Diagnostic settings for request. Request *HTTPMessageDiagnostic `json:"request,omitempty"` @@ -8462,7 +8481,7 @@ type ReportRecordContract struct { Name *string `json:"name,omitempty"` // Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. Timestamp *date.Time `json:"timestamp,omitempty"` - // Interval - Length of agregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + // Interval - Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). Interval *string `json:"interval,omitempty"` // Country - Country to which this record data is related. Country *string `json:"country,omitempty"` @@ -8482,9 +8501,9 @@ type ReportRecordContract struct { APIRegion *string `json:"apiRegion,omitempty"` // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId} SubscriptionID *string `json:"subscriptionId,omitempty"` - // CallCountSuccess - Number of succesful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect + // CallCountSuccess - Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect CallCountSuccess *int32 `json:"callCountSuccess,omitempty"` - // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests CallCountBlocked *int32 `json:"callCountBlocked,omitempty"` // CallCountFailed - Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 CallCountFailed *int32 `json:"callCountFailed,omitempty"` @@ -8571,7 +8590,7 @@ type RequestReportRecordContract struct { ResponseSize *int32 `json:"responseSize,omitempty"` // Timestamp - The date and time when this request was received by the gateway in ISO 8601 format. Timestamp *date.Time `json:"timestamp,omitempty"` - // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fullfilled by the backend. + // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. Cache *string `json:"cache,omitempty"` // APITime - The total time it took to process this request. APITime *float64 `json:"apiTime,omitempty"` @@ -8597,6 +8616,180 @@ type Resource struct { Type *string `json:"type,omitempty"` } +// ResourceSku describes an available API Management SKU. +type ResourceSku struct { + // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption' + Name SkuType `json:"name,omitempty"` +} + +// ResourceSkuCapacity describes scaling information of a SKU. +type ResourceSkuCapacity struct { + // Minimum - The minimum capacity. + Minimum *int32 `json:"minimum,omitempty"` + // Maximum - The maximum capacity that can be set. + Maximum *int32 `json:"maximum,omitempty"` + // Default - The default capacity. + Default *int32 `json:"default,omitempty"` + // ScaleType - The scale type applicable to the sku. Possible values include: 'Automatic', 'Manual', 'None' + ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` +} + +// ResourceSkuResult describes an available API Management service SKU. +type ResourceSkuResult struct { + // ResourceType - The type of resource the SKU applies to. + ResourceType *string `json:"resourceType,omitempty"` + // Sku - Specifies API Management SKU. + Sku *ResourceSku `json:"sku,omitempty"` + // Capacity - Specifies the number of API Management units. + Capacity *ResourceSkuCapacity `json:"capacity,omitempty"` +} + +// ResourceSkuResults the API Management service SKUs operation response. +type ResourceSkuResults struct { + autorest.Response `json:"-"` + // Value - The list of skus available for the service. + Value *[]ResourceSkuResult `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of API Management service Skus. + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceSkuResultsIterator provides access to a complete listing of ResourceSkuResult values. +type ResourceSkuResultsIterator struct { + i int + page ResourceSkuResultsPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ResourceSkuResultsIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ResourceSkuResultsIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ResourceSkuResultsIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ResourceSkuResultsIterator) Response() ResourceSkuResults { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ResourceSkuResultsIterator) Value() ResourceSkuResult { + if !iter.page.NotDone() { + return ResourceSkuResult{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ResourceSkuResultsIterator type. +func NewResourceSkuResultsIterator(page ResourceSkuResultsPage) ResourceSkuResultsIterator { + return ResourceSkuResultsIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rsr ResourceSkuResults) IsEmpty() bool { + return rsr.Value == nil || len(*rsr.Value) == 0 +} + +// resourceSkuResultsPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rsr ResourceSkuResults) resourceSkuResultsPreparer(ctx context.Context) (*http.Request, error) { + if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rsr.NextLink))) +} + +// ResourceSkuResultsPage contains a page of ResourceSkuResult values. +type ResourceSkuResultsPage struct { + fn func(context.Context, ResourceSkuResults) (ResourceSkuResults, error) + rsr ResourceSkuResults +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ResourceSkuResultsPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rsr) + if err != nil { + return err + } + page.rsr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ResourceSkuResultsPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ResourceSkuResultsPage) NotDone() bool { + return !page.rsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ResourceSkuResultsPage) Response() ResourceSkuResults { + return page.rsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ResourceSkuResultsPage) Values() []ResourceSkuResult { + if page.rsr.IsEmpty() { + return nil + } + return *page.rsr.Value +} + +// Creates a new instance of the ResourceSkuResultsPage type. +func NewResourceSkuResultsPage(getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage { + return ResourceSkuResultsPage{fn: getNextPage} +} + // ResponseContract operation response details. type ResponseContract struct { // StatusCode - Operation response HTTP status code. @@ -9024,7 +9217,7 @@ type ServiceBaseProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -9332,7 +9525,7 @@ type ServiceProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -9582,7 +9775,7 @@ func (future *ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceReso // ServiceSkuProperties API Management service resource SKU properties. type ServiceSkuProperties struct { - // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic' + // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption' Name SkuType `json:"name,omitempty"` // Capacity - Capacity of the SKU (number of deployed units of the SKU). The default value is 1. Capacity *int32 `json:"capacity,omitempty"` @@ -9829,7 +10022,7 @@ type ServiceUpdateProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` - // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' + // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go index a761975f8335..3cd4dc95fa80 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go @@ -151,7 +151,7 @@ func (client PropertyClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete deletes specific property from the the API Management service instance. +// Delete deletes specific property from the API Management service instance. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go index 3686f1e17f62..5ae24f08cd3b 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go @@ -180,7 +180,7 @@ func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroup return } -// ListByGeo lists report records by GeoGraphy. +// ListByGeo lists report records by geography. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -847,7 +847,7 @@ func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, reso // serviceName - the name of the API Management service. // interval - by time interval. Interval must be multiple of 15 minutes and may not be zero. The value should // be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert -// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds)) +// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) // filter - the filter to apply on the operation. // top - number of records to return. // skip - number of records to skip. diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go new file mode 100644 index 000000000000..346249aa265f --- /dev/null +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go @@ -0,0 +1,165 @@ +package apimanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ServiceSkusClient is the apiManagement Client +type ServiceSkusClient struct { + BaseClient +} + +// NewServiceSkusClient creates an instance of the ServiceSkusClient client. +func NewServiceSkusClient(subscriptionID string) ServiceSkusClient { + return NewServiceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client. +func NewServiceSkusClientWithBaseURI(baseURI string, subscriptionID string) ServiceSkusClient { + return ServiceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListAvailableServiceSkus gets all available SKU for a given API Management service +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +func (client ServiceSkusClient) ListAvailableServiceSkus(ctx context.Context, resourceGroupName string, serviceName string) (result ResourceSkuResultsPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkusClient.ListAvailableServiceSkus") + defer func() { + sc := -1 + if result.rsr.Response.Response != nil { + sc = result.rsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", err.Error()) + } + + result.fn = client.listAvailableServiceSkusNextResults + req, err := client.ListAvailableServiceSkusPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableServiceSkusSender(req) + if err != nil { + result.rsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", resp, "Failure sending request") + return + } + + result.rsr, err = client.ListAvailableServiceSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", resp, "Failure responding to request") + } + + return +} + +// ListAvailableServiceSkusPreparer prepares the ListAvailableServiceSkus request. +func (client ServiceSkusClient) ListAvailableServiceSkusPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableServiceSkusSender sends the ListAvailableServiceSkus request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceSkusClient) ListAvailableServiceSkusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListAvailableServiceSkusResponder handles the response to the ListAvailableServiceSkus request. The method always +// closes the http.Response Body. +func (client ServiceSkusClient) ListAvailableServiceSkusResponder(resp *http.Response) (result ResourceSkuResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAvailableServiceSkusNextResults retrieves the next set of results, if any. +func (client ServiceSkusClient) listAvailableServiceSkusNextResults(ctx context.Context, lastResults ResourceSkuResults) (result ResourceSkuResults, err error) { + req, err := lastResults.resourceSkuResultsPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAvailableServiceSkusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAvailableServiceSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAvailableServiceSkusComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServiceSkusClient) ListAvailableServiceSkusComplete(ctx context.Context, resourceGroupName string, serviceName string) (result ResourceSkuResultsIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkusClient.ListAvailableServiceSkus") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListAvailableServiceSkus(ctx, resourceGroupName, serviceName) + return +} diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go index 007078a5c247..4ec18de23dfc 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go @@ -764,7 +764,7 @@ func (client SubscriptionClient) RegenerateSecondaryKeyResponder(resp *http.Resp return } -// Update updates the details of a subscription specificied by its identifier. +// Update updates the details of a subscription specified by its identifier. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go index 72938ba32d93..1d8827822696 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go @@ -41,7 +41,7 @@ func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) T return TagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create/Update tag fescription in scope of the Api. +// CreateOrUpdate create/Update tag description in scope of the Api. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service.