diff --git a/services/cdn/mgmt/2015-06-01/cdn/CHANGELOG.md b/services/cdn/mgmt/2015-06-01/cdn/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2015-06-01/cdn/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/cdn/mgmt/2015-06-01/cdn/_meta.json b/services/cdn/mgmt/2015-06-01/cdn/_meta.json index 4faa9ce03887..63edb52cbd6b 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/_meta.json +++ b/services/cdn/mgmt/2015-06-01/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2015-06", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2016-04-02/cdn/CHANGELOG.md b/services/cdn/mgmt/2016-04-02/cdn/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2016-04-02/cdn/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/cdn/mgmt/2016-04-02/cdn/_meta.json b/services/cdn/mgmt/2016-04-02/cdn/_meta.json index 1e1f168e62c5..b77a23606446 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/_meta.json +++ b/services/cdn/mgmt/2016-04-02/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2016-04", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2016-10-02/cdn/CHANGELOG.md b/services/cdn/mgmt/2016-10-02/cdn/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2016-10-02/cdn/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/cdn/mgmt/2016-10-02/cdn/_meta.json b/services/cdn/mgmt/2016-10-02/cdn/_meta.json index f0d436fc8745..3c4d8701b89d 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/_meta.json +++ b/services/cdn/mgmt/2016-10-02/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2016-10", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2017-04-02/cdn/CHANGELOG.md b/services/cdn/mgmt/2017-04-02/cdn/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2017-04-02/cdn/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/cdn/mgmt/2017-04-02/cdn/_meta.json b/services/cdn/mgmt/2017-04-02/cdn/_meta.json index 8447018f2dc7..00961f89a85f 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/_meta.json +++ b/services/cdn/mgmt/2017-04-02/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2017-04", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2017-10-12/cdn/CHANGELOG.md b/services/cdn/mgmt/2017-10-12/cdn/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2017-10-12/cdn/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/cdn/mgmt/2017-10-12/cdn/_meta.json b/services/cdn/mgmt/2017-10-12/cdn/_meta.json index 5d88e6044cb0..8d2933d681f5 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/_meta.json +++ b/services/cdn/mgmt/2017-10-12/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2017-10", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2019-04-15/cdn/CHANGELOG.md b/services/cdn/mgmt/2019-04-15/cdn/CHANGELOG.md index 52911e4cc5e4..92321c387e86 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2019-04-15/cdn/CHANGELOG.md @@ -1,2 +1,45 @@ -# Change History +# Unreleased +## Breaking Changes + +### Signature Changes + +#### Funcs + +1. CustomDomainsClient.DisableCustomHTTPS + - Returns + - From: CustomDomain, error + - To: CustomDomainsDisableCustomHTTPSFuture, error +1. CustomDomainsClient.DisableCustomHTTPSSender + - Returns + - From: *http.Response, error + - To: CustomDomainsDisableCustomHTTPSFuture, error +1. CustomDomainsClient.EnableCustomHTTPS + - Returns + - From: CustomDomain, error + - To: CustomDomainsEnableCustomHTTPSFuture, error +1. CustomDomainsClient.EnableCustomHTTPSSender + - Returns + - From: *http.Response, error + - To: CustomDomainsEnableCustomHTTPSFuture, error + +## Additive Changes + +### New Constants + +1. Transform.RemoveNulls +1. Transform.Trim +1. Transform.URLDecode +1. Transform.URLEncode + +### New Funcs + +1. *CustomDomainsDisableCustomHTTPSFuture.UnmarshalJSON([]byte) error +1. *CustomDomainsEnableCustomHTTPSFuture.UnmarshalJSON([]byte) error + +### Struct Changes + +#### New Structs + +1. CustomDomainsDisableCustomHTTPSFuture +1. CustomDomainsEnableCustomHTTPSFuture diff --git a/services/cdn/mgmt/2019-04-15/cdn/_meta.json b/services/cdn/mgmt/2019-04-15/cdn/_meta.json index dbe025744c27..2fac9eee2da4 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/_meta.json +++ b/services/cdn/mgmt/2019-04-15/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2019-04", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2019-04-15/cdn/cdnapi/interfaces.go b/services/cdn/mgmt/2019-04-15/cdn/cdnapi/interfaces.go index 26538fb03d0e..9963e601a5f8 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/cdnapi/interfaces.go +++ b/services/cdn/mgmt/2019-04-15/cdn/cdnapi/interfaces.go @@ -71,8 +71,8 @@ var _ OriginsClientAPI = (*cdn.OriginsClient)(nil) type CustomDomainsClientAPI interface { Create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties cdn.CustomDomainParameters) (result cdn.CustomDomainsCreateFuture, err error) Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomainsDeleteFuture, err error) - DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) - EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomain, err error) + DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomainsDisableCustomHTTPSFuture, err error) + EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomainsEnableCustomHTTPSFuture, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultPage, err error) ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultIterator, err error) diff --git a/services/cdn/mgmt/2019-04-15/cdn/customdomains.go b/services/cdn/mgmt/2019-04-15/cdn/customdomains.go index 7d34d988c68e..d93135367490 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/customdomains.go +++ b/services/cdn/mgmt/2019-04-15/cdn/customdomains.go @@ -225,13 +225,13 @@ func (client CustomDomainsClient) DeleteResponder(resp *http.Response) (result C // profileName - name of the CDN profile which is unique within the resource group. // endpointName - name of the endpoint under the profile which is unique globally. // customDomainName - name of the custom domain within an endpoint. -func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) { +func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomainsDisableCustomHTTPSFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.DisableCustomHTTPS") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -250,16 +250,9 @@ func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resour return } - resp, err := client.DisableCustomHTTPSSender(req) + result, err = client.DisableCustomHTTPSSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", resp, "Failure sending request") - return - } - - result, err = client.DisableCustomHTTPSResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", result.Response(), "Failure sending request") return } @@ -291,8 +284,18 @@ func (client CustomDomainsClient) DisableCustomHTTPSPreparer(ctx context.Context // DisableCustomHTTPSSender sends the DisableCustomHTTPS request. The method will close the // http.Response Body if it receives an error. -func (client CustomDomainsClient) DisableCustomHTTPSSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client CustomDomainsClient) DisableCustomHTTPSSender(req *http.Request) (future CustomDomainsDisableCustomHTTPSFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return } // DisableCustomHTTPSResponder handles the response to the DisableCustomHTTPS request. The method always @@ -316,13 +319,13 @@ func (client CustomDomainsClient) DisableCustomHTTPSResponder(resp *http.Respons // customDomainHTTPSParameters - the configuration specifying how to enable HTTPS for the custom domain - using // CDN managed certificate or user's own certificate. If not specified, enabling ssl uses CDN managed // certificate by default. -func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *BasicCustomDomainHTTPSParameters) (result CustomDomain, err error) { +func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *BasicCustomDomainHTTPSParameters) (result CustomDomainsEnableCustomHTTPSFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.EnableCustomHTTPS") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -341,16 +344,9 @@ func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourc return } - resp, err := client.EnableCustomHTTPSSender(req) + result, err = client.EnableCustomHTTPSSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", resp, "Failure sending request") - return - } - - result, err = client.EnableCustomHTTPSResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", result.Response(), "Failure sending request") return } @@ -387,8 +383,18 @@ func (client CustomDomainsClient) EnableCustomHTTPSPreparer(ctx context.Context, // EnableCustomHTTPSSender sends the EnableCustomHTTPS request. The method will close the // http.Response Body if it receives an error. -func (client CustomDomainsClient) EnableCustomHTTPSSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client CustomDomainsClient) EnableCustomHTTPSSender(req *http.Request) (future CustomDomainsEnableCustomHTTPSFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return } // EnableCustomHTTPSResponder handles the response to the EnableCustomHTTPS request. The method always diff --git a/services/cdn/mgmt/2019-04-15/cdn/enums.go b/services/cdn/mgmt/2019-04-15/cdn/enums.go index c83f75e4a6b4..9572abfd6795 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/enums.go +++ b/services/cdn/mgmt/2019-04-15/cdn/enums.go @@ -643,13 +643,21 @@ type Transform string const ( // Lowercase ... Lowercase Transform = "Lowercase" + // RemoveNulls ... + RemoveNulls Transform = "RemoveNulls" + // Trim ... + Trim Transform = "Trim" // Uppercase ... Uppercase Transform = "Uppercase" + // URLDecode ... + URLDecode Transform = "UrlDecode" + // URLEncode ... + URLEncode Transform = "UrlEncode" ) // PossibleTransformValues returns an array of possible values for the Transform const type. func PossibleTransformValues() []Transform { - return []Transform{Lowercase, Uppercase} + return []Transform{Lowercase, RemoveNulls, Trim, Uppercase, URLDecode, URLEncode} } // URLFileExtensionOperator enumerates the values for url file extension operator. diff --git a/services/cdn/mgmt/2019-04-15/cdn/models.go b/services/cdn/mgmt/2019-04-15/cdn/models.go index db2b5c87dd8a..13e66696bd93 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/models.go +++ b/services/cdn/mgmt/2019-04-15/cdn/models.go @@ -670,6 +670,92 @@ func (future *CustomDomainsDeleteFuture) result(client CustomDomainsClient) (cd return } +// CustomDomainsDisableCustomHTTPSFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CustomDomainsDisableCustomHTTPSFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CustomDomainsClient) (CustomDomain, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CustomDomainsDisableCustomHTTPSFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CustomDomainsDisableCustomHTTPSFuture.Result. +func (future *CustomDomainsDisableCustomHTTPSFuture) result(client CustomDomainsClient) (cd CustomDomain, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDisableCustomHTTPSFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cd.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDisableCustomHTTPSFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent { + cd, err = client.DisableCustomHTTPSResponder(cd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDisableCustomHTTPSFuture", "Result", cd.Response.Response, "Failure responding to request") + } + } + return +} + +// CustomDomainsEnableCustomHTTPSFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CustomDomainsEnableCustomHTTPSFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CustomDomainsClient) (CustomDomain, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CustomDomainsEnableCustomHTTPSFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CustomDomainsEnableCustomHTTPSFuture.Result. +func (future *CustomDomainsEnableCustomHTTPSFuture) result(client CustomDomainsClient) (cd CustomDomain, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsEnableCustomHTTPSFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cd.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsEnableCustomHTTPSFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent { + cd, err = client.EnableCustomHTTPSResponder(cd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsEnableCustomHTTPSFuture", "Result", cd.Response.Response, "Failure responding to request") + } + } + return +} + // DeepCreatedOrigin the main origin of CDN content which is added when creating a CDN endpoint. type DeepCreatedOrigin struct { // Name - Origin name diff --git a/services/cdn/mgmt/2019-06-15/cdn/CHANGELOG.md b/services/cdn/mgmt/2019-06-15/cdn/CHANGELOG.md index 52911e4cc5e4..92321c387e86 100644 --- a/services/cdn/mgmt/2019-06-15/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2019-06-15/cdn/CHANGELOG.md @@ -1,2 +1,45 @@ -# Change History +# Unreleased +## Breaking Changes + +### Signature Changes + +#### Funcs + +1. CustomDomainsClient.DisableCustomHTTPS + - Returns + - From: CustomDomain, error + - To: CustomDomainsDisableCustomHTTPSFuture, error +1. CustomDomainsClient.DisableCustomHTTPSSender + - Returns + - From: *http.Response, error + - To: CustomDomainsDisableCustomHTTPSFuture, error +1. CustomDomainsClient.EnableCustomHTTPS + - Returns + - From: CustomDomain, error + - To: CustomDomainsEnableCustomHTTPSFuture, error +1. CustomDomainsClient.EnableCustomHTTPSSender + - Returns + - From: *http.Response, error + - To: CustomDomainsEnableCustomHTTPSFuture, error + +## Additive Changes + +### New Constants + +1. Transform.RemoveNulls +1. Transform.Trim +1. Transform.URLDecode +1. Transform.URLEncode + +### New Funcs + +1. *CustomDomainsDisableCustomHTTPSFuture.UnmarshalJSON([]byte) error +1. *CustomDomainsEnableCustomHTTPSFuture.UnmarshalJSON([]byte) error + +### Struct Changes + +#### New Structs + +1. CustomDomainsDisableCustomHTTPSFuture +1. CustomDomainsEnableCustomHTTPSFuture diff --git a/services/cdn/mgmt/2019-06-15/cdn/_meta.json b/services/cdn/mgmt/2019-06-15/cdn/_meta.json index 5e410783cfba..4d13ccd7b0fb 100644 --- a/services/cdn/mgmt/2019-06-15/cdn/_meta.json +++ b/services/cdn/mgmt/2019-06-15/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2019-06", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2019-06-15/cdn/cdnapi/interfaces.go b/services/cdn/mgmt/2019-06-15/cdn/cdnapi/interfaces.go index 3153bddd5b1f..994f4675720e 100644 --- a/services/cdn/mgmt/2019-06-15/cdn/cdnapi/interfaces.go +++ b/services/cdn/mgmt/2019-06-15/cdn/cdnapi/interfaces.go @@ -72,8 +72,8 @@ var _ OriginsClientAPI = (*cdn.OriginsClient)(nil) type CustomDomainsClientAPI interface { Create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties cdn.CustomDomainParameters) (result cdn.CustomDomainsCreateFuture, err error) Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomainsDeleteFuture, err error) - DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) - EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomain, err error) + DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomainsDisableCustomHTTPSFuture, err error) + EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomainsEnableCustomHTTPSFuture, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultPage, err error) ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultIterator, err error) diff --git a/services/cdn/mgmt/2019-06-15/cdn/customdomains.go b/services/cdn/mgmt/2019-06-15/cdn/customdomains.go index c8d68c6bef79..509c195901d9 100644 --- a/services/cdn/mgmt/2019-06-15/cdn/customdomains.go +++ b/services/cdn/mgmt/2019-06-15/cdn/customdomains.go @@ -225,13 +225,13 @@ func (client CustomDomainsClient) DeleteResponder(resp *http.Response) (result C // profileName - name of the CDN profile which is unique within the resource group. // endpointName - name of the endpoint under the profile which is unique globally. // customDomainName - name of the custom domain within an endpoint. -func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) { +func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomainsDisableCustomHTTPSFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.DisableCustomHTTPS") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -250,16 +250,9 @@ func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resour return } - resp, err := client.DisableCustomHTTPSSender(req) + result, err = client.DisableCustomHTTPSSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", resp, "Failure sending request") - return - } - - result, err = client.DisableCustomHTTPSResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", result.Response(), "Failure sending request") return } @@ -291,8 +284,18 @@ func (client CustomDomainsClient) DisableCustomHTTPSPreparer(ctx context.Context // DisableCustomHTTPSSender sends the DisableCustomHTTPS request. The method will close the // http.Response Body if it receives an error. -func (client CustomDomainsClient) DisableCustomHTTPSSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client CustomDomainsClient) DisableCustomHTTPSSender(req *http.Request) (future CustomDomainsDisableCustomHTTPSFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return } // DisableCustomHTTPSResponder handles the response to the DisableCustomHTTPS request. The method always @@ -316,13 +319,13 @@ func (client CustomDomainsClient) DisableCustomHTTPSResponder(resp *http.Respons // customDomainHTTPSParameters - the configuration specifying how to enable HTTPS for the custom domain - using // CDN managed certificate or user's own certificate. If not specified, enabling ssl uses CDN managed // certificate by default. -func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *BasicCustomDomainHTTPSParameters) (result CustomDomain, err error) { +func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *BasicCustomDomainHTTPSParameters) (result CustomDomainsEnableCustomHTTPSFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.EnableCustomHTTPS") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -341,16 +344,9 @@ func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourc return } - resp, err := client.EnableCustomHTTPSSender(req) + result, err = client.EnableCustomHTTPSSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", resp, "Failure sending request") - return - } - - result, err = client.EnableCustomHTTPSResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", result.Response(), "Failure sending request") return } @@ -387,8 +383,18 @@ func (client CustomDomainsClient) EnableCustomHTTPSPreparer(ctx context.Context, // EnableCustomHTTPSSender sends the EnableCustomHTTPS request. The method will close the // http.Response Body if it receives an error. -func (client CustomDomainsClient) EnableCustomHTTPSSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client CustomDomainsClient) EnableCustomHTTPSSender(req *http.Request) (future CustomDomainsEnableCustomHTTPSFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return } // EnableCustomHTTPSResponder handles the response to the EnableCustomHTTPS request. The method always diff --git a/services/cdn/mgmt/2019-06-15/cdn/enums.go b/services/cdn/mgmt/2019-06-15/cdn/enums.go index abafc7b961f0..86b6b90830da 100644 --- a/services/cdn/mgmt/2019-06-15/cdn/enums.go +++ b/services/cdn/mgmt/2019-06-15/cdn/enums.go @@ -826,13 +826,21 @@ type Transform string const ( // Lowercase ... Lowercase Transform = "Lowercase" + // RemoveNulls ... + RemoveNulls Transform = "RemoveNulls" + // Trim ... + Trim Transform = "Trim" // Uppercase ... Uppercase Transform = "Uppercase" + // URLDecode ... + URLDecode Transform = "UrlDecode" + // URLEncode ... + URLEncode Transform = "UrlEncode" ) // PossibleTransformValues returns an array of possible values for the Transform const type. func PossibleTransformValues() []Transform { - return []Transform{Lowercase, Uppercase} + return []Transform{Lowercase, RemoveNulls, Trim, Uppercase, URLDecode, URLEncode} } // TransformType enumerates the values for transform type. diff --git a/services/cdn/mgmt/2019-06-15/cdn/models.go b/services/cdn/mgmt/2019-06-15/cdn/models.go index 2ff08eadfb43..b048fa6edfc5 100644 --- a/services/cdn/mgmt/2019-06-15/cdn/models.go +++ b/services/cdn/mgmt/2019-06-15/cdn/models.go @@ -670,6 +670,92 @@ func (future *CustomDomainsDeleteFuture) result(client CustomDomainsClient) (cd return } +// CustomDomainsDisableCustomHTTPSFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CustomDomainsDisableCustomHTTPSFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CustomDomainsClient) (CustomDomain, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CustomDomainsDisableCustomHTTPSFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CustomDomainsDisableCustomHTTPSFuture.Result. +func (future *CustomDomainsDisableCustomHTTPSFuture) result(client CustomDomainsClient) (cd CustomDomain, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDisableCustomHTTPSFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cd.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDisableCustomHTTPSFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent { + cd, err = client.DisableCustomHTTPSResponder(cd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDisableCustomHTTPSFuture", "Result", cd.Response.Response, "Failure responding to request") + } + } + return +} + +// CustomDomainsEnableCustomHTTPSFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CustomDomainsEnableCustomHTTPSFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CustomDomainsClient) (CustomDomain, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CustomDomainsEnableCustomHTTPSFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CustomDomainsEnableCustomHTTPSFuture.Result. +func (future *CustomDomainsEnableCustomHTTPSFuture) result(client CustomDomainsClient) (cd CustomDomain, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsEnableCustomHTTPSFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cd.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsEnableCustomHTTPSFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent { + cd, err = client.EnableCustomHTTPSResponder(cd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsEnableCustomHTTPSFuture", "Result", cd.Response.Response, "Failure responding to request") + } + } + return +} + // CustomRule defines the common attributes for a custom rule that can be included in a waf policy type CustomRule struct { // Name - Defines the name of the custom rule diff --git a/services/cdn/mgmt/2020-04-15/cdn/CHANGELOG.md b/services/cdn/mgmt/2020-04-15/cdn/CHANGELOG.md index 52911e4cc5e4..9d700fae740f 100644 --- a/services/cdn/mgmt/2020-04-15/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2020-04-15/cdn/CHANGELOG.md @@ -1,2 +1,50 @@ -# Change History +# Unreleased +## Breaking Changes + +### Signature Changes + +#### Funcs + +1. CustomDomainsClient.DisableCustomHTTPS + - Returns + - From: CustomDomain, error + - To: CustomDomainsDisableCustomHTTPSFuture, error +1. CustomDomainsClient.DisableCustomHTTPSSender + - Returns + - From: *http.Response, error + - To: CustomDomainsDisableCustomHTTPSFuture, error +1. CustomDomainsClient.EnableCustomHTTPS + - Returns + - From: CustomDomain, error + - To: CustomDomainsEnableCustomHTTPSFuture, error +1. CustomDomainsClient.EnableCustomHTTPSSender + - Returns + - From: *http.Response, error + - To: CustomDomainsEnableCustomHTTPSFuture, error + +## Additive Changes + +### New Constants + +1. Transform.RemoveNulls +1. Transform.Trim +1. Transform.URLDecode +1. Transform.URLEncode + +### New Funcs + +1. *CustomDomainProperties.UnmarshalJSON([]byte) error +1. *CustomDomainsDisableCustomHTTPSFuture.UnmarshalJSON([]byte) error +1. *CustomDomainsEnableCustomHTTPSFuture.UnmarshalJSON([]byte) error + +### Struct Changes + +#### New Structs + +1. CustomDomainsDisableCustomHTTPSFuture +1. CustomDomainsEnableCustomHTTPSFuture + +#### New Struct Fields + +1. CustomDomainProperties.CustomHTTPSParameters diff --git a/services/cdn/mgmt/2020-04-15/cdn/_meta.json b/services/cdn/mgmt/2020-04-15/cdn/_meta.json index f410fdd80bd5..d41f8141d63f 100644 --- a/services/cdn/mgmt/2020-04-15/cdn/_meta.json +++ b/services/cdn/mgmt/2020-04-15/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2020-04", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2020-04-15/cdn/cdnapi/interfaces.go b/services/cdn/mgmt/2020-04-15/cdn/cdnapi/interfaces.go index 885b4e7b7102..a0e439d4fe1b 100644 --- a/services/cdn/mgmt/2020-04-15/cdn/cdnapi/interfaces.go +++ b/services/cdn/mgmt/2020-04-15/cdn/cdnapi/interfaces.go @@ -86,8 +86,8 @@ var _ OriginGroupsClientAPI = (*cdn.OriginGroupsClient)(nil) type CustomDomainsClientAPI interface { Create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties cdn.CustomDomainParameters) (result cdn.CustomDomainsCreateFuture, err error) Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomainsDeleteFuture, err error) - DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) - EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomain, err error) + DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomainsDisableCustomHTTPSFuture, err error) + EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomainsEnableCustomHTTPSFuture, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultPage, err error) ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultIterator, err error) diff --git a/services/cdn/mgmt/2020-04-15/cdn/customdomains.go b/services/cdn/mgmt/2020-04-15/cdn/customdomains.go index 1f48e3dd0fb3..9c7cf17acd87 100644 --- a/services/cdn/mgmt/2020-04-15/cdn/customdomains.go +++ b/services/cdn/mgmt/2020-04-15/cdn/customdomains.go @@ -225,13 +225,13 @@ func (client CustomDomainsClient) DeleteResponder(resp *http.Response) (result C // profileName - name of the CDN profile which is unique within the resource group. // endpointName - name of the endpoint under the profile which is unique globally. // customDomainName - name of the custom domain within an endpoint. -func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) { +func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomainsDisableCustomHTTPSFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.DisableCustomHTTPS") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -250,16 +250,9 @@ func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resour return } - resp, err := client.DisableCustomHTTPSSender(req) + result, err = client.DisableCustomHTTPSSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", resp, "Failure sending request") - return - } - - result, err = client.DisableCustomHTTPSResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DisableCustomHTTPS", result.Response(), "Failure sending request") return } @@ -291,8 +284,18 @@ func (client CustomDomainsClient) DisableCustomHTTPSPreparer(ctx context.Context // DisableCustomHTTPSSender sends the DisableCustomHTTPS request. The method will close the // http.Response Body if it receives an error. -func (client CustomDomainsClient) DisableCustomHTTPSSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client CustomDomainsClient) DisableCustomHTTPSSender(req *http.Request) (future CustomDomainsDisableCustomHTTPSFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return } // DisableCustomHTTPSResponder handles the response to the DisableCustomHTTPS request. The method always @@ -316,13 +319,13 @@ func (client CustomDomainsClient) DisableCustomHTTPSResponder(resp *http.Respons // customDomainHTTPSParameters - the configuration specifying how to enable HTTPS for the custom domain - using // CDN managed certificate or user's own certificate. If not specified, enabling ssl uses CDN managed // certificate by default. -func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *BasicCustomDomainHTTPSParameters) (result CustomDomain, err error) { +func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *BasicCustomDomainHTTPSParameters) (result CustomDomainsEnableCustomHTTPSFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.EnableCustomHTTPS") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -341,16 +344,9 @@ func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourc return } - resp, err := client.EnableCustomHTTPSSender(req) + result, err = client.EnableCustomHTTPSSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", resp, "Failure sending request") - return - } - - result, err = client.EnableCustomHTTPSResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "EnableCustomHTTPS", result.Response(), "Failure sending request") return } @@ -387,8 +383,18 @@ func (client CustomDomainsClient) EnableCustomHTTPSPreparer(ctx context.Context, // EnableCustomHTTPSSender sends the EnableCustomHTTPS request. The method will close the // http.Response Body if it receives an error. -func (client CustomDomainsClient) EnableCustomHTTPSSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client CustomDomainsClient) EnableCustomHTTPSSender(req *http.Request) (future CustomDomainsEnableCustomHTTPSFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return } // EnableCustomHTTPSResponder handles the response to the EnableCustomHTTPS request. The method always diff --git a/services/cdn/mgmt/2020-04-15/cdn/enums.go b/services/cdn/mgmt/2020-04-15/cdn/enums.go index f34eb33f0a79..c843e26ab70c 100644 --- a/services/cdn/mgmt/2020-04-15/cdn/enums.go +++ b/services/cdn/mgmt/2020-04-15/cdn/enums.go @@ -960,13 +960,21 @@ type Transform string const ( // Lowercase ... Lowercase Transform = "Lowercase" + // RemoveNulls ... + RemoveNulls Transform = "RemoveNulls" + // Trim ... + Trim Transform = "Trim" // Uppercase ... Uppercase Transform = "Uppercase" + // URLDecode ... + URLDecode Transform = "UrlDecode" + // URLEncode ... + URLEncode Transform = "UrlEncode" ) // PossibleTransformValues returns an array of possible values for the Transform const type. func PossibleTransformValues() []Transform { - return []Transform{Lowercase, Uppercase} + return []Transform{Lowercase, RemoveNulls, Trim, Uppercase, URLDecode, URLEncode} } // TransformType enumerates the values for transform type. diff --git a/services/cdn/mgmt/2020-04-15/cdn/models.go b/services/cdn/mgmt/2020-04-15/cdn/models.go index 967556048788..8baad3dbee29 100644 --- a/services/cdn/mgmt/2020-04-15/cdn/models.go +++ b/services/cdn/mgmt/2020-04-15/cdn/models.go @@ -479,6 +479,8 @@ type CustomDomainProperties struct { CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"` // CustomHTTPSProvisioningSubstate - READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. Possible values include: 'SubmittingDomainControlValidationRequest', 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', 'CertificateDeleted' CustomHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate `json:"customHttpsProvisioningSubstate,omitempty"` + // CustomHTTPSParameters - Certificate parameters for securing custom HTTPS + CustomHTTPSParameters BasicCustomDomainHTTPSParameters `json:"customHttpsParameters,omitempty"` // ValidationData - Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. ValidationData *string `json:"validationData,omitempty"` // ProvisioningState - READ-ONLY; Provisioning status of the custom domain. @@ -491,12 +493,90 @@ func (cdp CustomDomainProperties) MarshalJSON() ([]byte, error) { if cdp.HostName != nil { objectMap["hostName"] = cdp.HostName } + objectMap["customHttpsParameters"] = cdp.CustomHTTPSParameters if cdp.ValidationData != nil { objectMap["validationData"] = cdp.ValidationData } return json.Marshal(objectMap) } +// UnmarshalJSON is the custom unmarshaler for CustomDomainProperties struct. +func (cdp *CustomDomainProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "hostName": + if v != nil { + var hostName string + err = json.Unmarshal(*v, &hostName) + if err != nil { + return err + } + cdp.HostName = &hostName + } + case "resourceState": + if v != nil { + var resourceState CustomDomainResourceState + err = json.Unmarshal(*v, &resourceState) + if err != nil { + return err + } + cdp.ResourceState = resourceState + } + case "customHttpsProvisioningState": + if v != nil { + var customHTTPSProvisioningState CustomHTTPSProvisioningState + err = json.Unmarshal(*v, &customHTTPSProvisioningState) + if err != nil { + return err + } + cdp.CustomHTTPSProvisioningState = customHTTPSProvisioningState + } + case "customHttpsProvisioningSubstate": + if v != nil { + var customHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate + err = json.Unmarshal(*v, &customHTTPSProvisioningSubstate) + if err != nil { + return err + } + cdp.CustomHTTPSProvisioningSubstate = customHTTPSProvisioningSubstate + } + case "customHttpsParameters": + if v != nil { + customHTTPSParameters, err := unmarshalBasicCustomDomainHTTPSParameters(*v) + if err != nil { + return err + } + cdp.CustomHTTPSParameters = customHTTPSParameters + } + case "validationData": + if v != nil { + var validationData string + err = json.Unmarshal(*v, &validationData) + if err != nil { + return err + } + cdp.ValidationData = &validationData + } + case "provisioningState": + if v != nil { + var provisioningState string + err = json.Unmarshal(*v, &provisioningState) + if err != nil { + return err + } + cdp.ProvisioningState = &provisioningState + } + } + } + + return nil +} + // CustomDomainPropertiesParameters the JSON object that contains the properties of the custom domain to // create. type CustomDomainPropertiesParameters struct { @@ -590,6 +670,92 @@ func (future *CustomDomainsDeleteFuture) result(client CustomDomainsClient) (cd return } +// CustomDomainsDisableCustomHTTPSFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CustomDomainsDisableCustomHTTPSFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CustomDomainsClient) (CustomDomain, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CustomDomainsDisableCustomHTTPSFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CustomDomainsDisableCustomHTTPSFuture.Result. +func (future *CustomDomainsDisableCustomHTTPSFuture) result(client CustomDomainsClient) (cd CustomDomain, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDisableCustomHTTPSFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cd.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsDisableCustomHTTPSFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent { + cd, err = client.DisableCustomHTTPSResponder(cd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsDisableCustomHTTPSFuture", "Result", cd.Response.Response, "Failure responding to request") + } + } + return +} + +// CustomDomainsEnableCustomHTTPSFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CustomDomainsEnableCustomHTTPSFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CustomDomainsClient) (CustomDomain, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CustomDomainsEnableCustomHTTPSFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CustomDomainsEnableCustomHTTPSFuture.Result. +func (future *CustomDomainsEnableCustomHTTPSFuture) result(client CustomDomainsClient) (cd CustomDomain, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsEnableCustomHTTPSFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cd.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("cdn.CustomDomainsEnableCustomHTTPSFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent { + cd, err = client.EnableCustomHTTPSResponder(cd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsEnableCustomHTTPSFuture", "Result", cd.Response.Response, "Failure responding to request") + } + } + return +} + // CustomRule defines the common attributes for a custom rule that can be included in a waf policy type CustomRule struct { // Name - Defines the name of the custom rule diff --git a/services/cdn/mgmt/2020-09-01/cdn/CHANGELOG.md b/services/cdn/mgmt/2020-09-01/cdn/CHANGELOG.md index 2566c14286a5..081fb1bcceec 100644 --- a/services/cdn/mgmt/2020-09-01/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2020-09-01/cdn/CHANGELOG.md @@ -1,416 +1,21 @@ -# Change History +# Unreleased ## Breaking Changes -### Removed Constants - -1. AFDEndpointProtocols.HTTP -1. AFDEndpointProtocols.HTTPS -1. ActionType.Allow -1. ActionType.Block -1. ActionType.Log -1. ActionType.Redirect -1. AfdMinimumTLSVersion.TLS10 -1. AfdMinimumTLSVersion.TLS12 -1. AfdProvisioningState.Creating -1. AfdProvisioningState.Deleting -1. AfdProvisioningState.Failed -1. AfdProvisioningState.Succeeded -1. AfdProvisioningState.Updating -1. AfdQueryStringCachingBehavior.IgnoreQueryString -1. AfdQueryStringCachingBehavior.NotSet -1. AfdQueryStringCachingBehavior.UseQueryString -1. Algorithm.SHA256 -1. CacheBehavior.BypassCache -1. CacheBehavior.Override -1. CacheBehavior.SetIfMissing -1. CertificateType.Dedicated -1. CertificateType.Shared -1. CookiesOperator.Any -1. CookiesOperator.BeginsWith -1. CookiesOperator.Contains -1. CookiesOperator.EndsWith -1. CookiesOperator.Equal -1. CookiesOperator.GreaterThan -1. CookiesOperator.GreaterThanOrEqual -1. CookiesOperator.LessThan -1. CookiesOperator.LessThanOrEqual -1. CookiesOperator.RegEx -1. CustomHTTPSProvisioningSubstate.CertificateDeleted -1. CustomHTTPSProvisioningSubstate.CertificateDeployed -1. CustomHTTPSProvisioningSubstate.DeletingCertificate -1. CustomHTTPSProvisioningSubstate.DeployingCertificate -1. CustomHTTPSProvisioningSubstate.DomainControlValidationRequestApproved -1. CustomHTTPSProvisioningSubstate.DomainControlValidationRequestRejected -1. CustomHTTPSProvisioningSubstate.DomainControlValidationRequestTimedOut -1. CustomHTTPSProvisioningSubstate.IssuingCertificate -1. CustomHTTPSProvisioningSubstate.PendingDomainControlValidationREquestApproval -1. CustomHTTPSProvisioningSubstate.SubmittingDomainControlValidationRequest -1. CustomRuleEnabledState.Disabled -1. CustomRuleEnabledState.Enabled -1. DomainValidationState.Approved -1. DomainValidationState.Pending -1. DomainValidationState.PendingRevalidation -1. DomainValidationState.Submitting -1. DomainValidationState.TimedOut -1. DomainValidationState.Unknown -1. ForwardingProtocol.HTTPOnly -1. ForwardingProtocol.HTTPSOnly -1. ForwardingProtocol.MatchRequest -1. Granularity.P1D -1. Granularity.PT1H -1. Granularity.PT5M -1. HeaderAction.Append -1. HeaderAction.Delete -1. HeaderAction.Overwrite -1. IdentityType.Application -1. IdentityType.Key -1. IdentityType.ManagedIdentity -1. IdentityType.User -1. MatchProcessingBehavior.Continue -1. MatchProcessingBehavior.Stop -1. MatchVariable.Cookies -1. MatchVariable.PostArgs -1. MatchVariable.QueryString -1. MatchVariable.RemoteAddr -1. MatchVariable.RequestBody -1. MatchVariable.RequestHeader -1. MatchVariable.RequestMethod -1. MatchVariable.RequestURI -1. MatchVariable.SocketAddr -1. NameBasicDeliveryRuleAction.NameCacheExpiration -1. NameBasicDeliveryRuleAction.NameCacheKeyQueryString -1. NameBasicDeliveryRuleAction.NameDeliveryRuleAction -1. NameBasicDeliveryRuleAction.NameModifyRequestHeader -1. NameBasicDeliveryRuleAction.NameModifyResponseHeader -1. NameBasicDeliveryRuleAction.NameOriginGroupOverride -1. NameBasicDeliveryRuleAction.NameURLRedirect -1. NameBasicDeliveryRuleAction.NameURLRewrite -1. NameBasicDeliveryRuleAction.NameURLSigning -1. OptimizationType.DynamicSiteAcceleration -1. OptimizationType.GeneralMediaStreaming -1. OptimizationType.GeneralWebDelivery -1. OptimizationType.LargeFileDownload -1. OptimizationType.VideoOnDemandMediaStreaming -1. ParamIndicator.Expires -1. ParamIndicator.KeyID -1. ParamIndicator.Signature -1. PolicyMode.Detection -1. PolicyMode.Prevention -1. ProtocolType.IPBased -1. ProtocolType.ServerNameIndication -1. QueryStringBehavior.Exclude -1. QueryStringBehavior.ExcludeAll -1. QueryStringBehavior.Include -1. QueryStringBehavior.IncludeAll -1. RedirectType.Found -1. RedirectType.Moved -1. RedirectType.PermanentRedirect -1. RedirectType.TemporaryRedirect -1. ResourceType.MicrosoftCdnProfilesEndpoints -1. ResponseBasedDetectedErrorTypes.None -1. ResponseBasedDetectedErrorTypes.TCPAndHTTPErrors -1. ResponseBasedDetectedErrorTypes.TCPErrorsOnly -1. SkuName.CustomVerizon -1. SkuName.PremiumAzureFrontDoor -1. SkuName.PremiumChinaCdn -1. SkuName.PremiumVerizon -1. SkuName.Standard955BandWidthChinaCdn -1. SkuName.StandardAkamai -1. SkuName.StandardAvgBandWidthChinaCdn -1. SkuName.StandardAzureFrontDoor -1. SkuName.StandardChinaCdn -1. SkuName.StandardMicrosoft -1. SkuName.StandardPlus955BandWidthChinaCdn -1. SkuName.StandardPlusAvgBandWidthChinaCdn -1. SkuName.StandardPlusChinaCdn -1. SkuName.StandardVerizon -1. Status.AccessDenied -1. Status.CertificateExpired -1. Status.Invalid -1. Status.Valid -1. Transform.Lowercase -1. Transform.Uppercase -1. TypeBasicSecretParameters.TypeCustomerCertificate -1. TypeBasicSecretParameters.TypeManagedCertificate -1. TypeBasicSecretParameters.TypeSecretParameters -1. TypeBasicSecretParameters.TypeURLSigningKey -1. Unit.BitsPerSecond -1. Unit.Bytes -1. Unit.Count - ### Signature Changes -#### Funcs +#### Struct Fields -1. CustomDomainsClient.DisableCustomHTTPS - - Returns - - From: CustomDomain, error - - To: CustomDomainsDisableCustomHTTPSFuture, error -1. CustomDomainsClient.DisableCustomHTTPSSender - - Returns - - From: *http.Response, error - - To: CustomDomainsDisableCustomHTTPSFuture, error -1. CustomDomainsClient.EnableCustomHTTPS - - Returns - - From: CustomDomain, error - - To: CustomDomainsEnableCustomHTTPSFuture, error -1. CustomDomainsClient.EnableCustomHTTPSSender - - Returns - - From: *http.Response, error - - To: CustomDomainsEnableCustomHTTPSFuture, error -1. LogAnalyticsClient.GetLogAnalyticsMetrics - - Params - - From: context.Context, string, string, []string, date.Time, date.Time, string, []string, []string, []string, []string, []string - - To: context.Context, string, string, []LogMetric, date.Time, date.Time, LogMetricsGranularity, []string, []string, []LogMetricsGroupBy, []string, []string -1. LogAnalyticsClient.GetLogAnalyticsMetricsPreparer - - Params - - From: context.Context, string, string, []string, date.Time, date.Time, string, []string, []string, []string, []string, []string - - To: context.Context, string, string, []LogMetric, date.Time, date.Time, LogMetricsGranularity, []string, []string, []LogMetricsGroupBy, []string, []string -1. LogAnalyticsClient.GetLogAnalyticsRankings - - Params - - From: context.Context, string, string, []string, []string, int32, date.Time, date.Time, []string - - To: context.Context, string, string, []LogRanking, []LogRankingMetric, int32, date.Time, date.Time, []string -1. LogAnalyticsClient.GetLogAnalyticsRankingsPreparer - - Params - - From: context.Context, string, string, []string, []string, int32, date.Time, date.Time, []string - - To: context.Context, string, string, []LogRanking, []LogRankingMetric, int32, date.Time, date.Time, []string -1. LogAnalyticsClient.GetWafLogAnalyticsMetrics - - Params - - From: context.Context, string, string, []string, date.Time, date.Time, string, []string, []string, []string - - To: context.Context, string, string, []WafMetric, date.Time, date.Time, WafGranularity, []WafAction, []WafRankingGroupBy, []WafRuleType -1. LogAnalyticsClient.GetWafLogAnalyticsMetricsPreparer - - Params - - From: context.Context, string, string, []string, date.Time, date.Time, string, []string, []string, []string - - To: context.Context, string, string, []WafMetric, date.Time, date.Time, WafGranularity, []WafAction, []WafRankingGroupBy, []WafRuleType -1. LogAnalyticsClient.GetWafLogAnalyticsRankings - - Params - - From: context.Context, string, string, []string, date.Time, date.Time, int32, []string, []string, []string - - To: context.Context, string, string, []WafMetric, date.Time, date.Time, int32, []WafRankingType, []WafAction, []WafRuleType -1. LogAnalyticsClient.GetWafLogAnalyticsRankingsPreparer - - Params - - From: context.Context, string, string, []string, date.Time, date.Time, int32, []string, []string, []string - - To: context.Context, string, string, []WafMetric, date.Time, date.Time, int32, []WafRankingType, []WafAction, []WafRuleType -1. RuleSetsClient.Create - - Params - - From: context.Context, string, string, string, RuleSet - - To: context.Context, string, string, string -1. RuleSetsClient.CreatePreparer - - Params - - From: context.Context, string, string, string, RuleSet - - To: context.Context, string, string, string +1. AFDOriginProperties.SharedPrivateLinkResource changed type from interface{} to *SharedPrivateLinkResourceProperties +1. AFDOriginUpdatePropertiesParameters.SharedPrivateLinkResource changed type from interface{} to *SharedPrivateLinkResourceProperties +1. RouteProperties.CompressionSettings changed type from interface{} to *CompressionSettings +1. RouteUpdatePropertiesParameters.CompressionSettings changed type from interface{} to *CompressionSettings ## Additive Changes ### New Constants -1. AFDEndpointProtocols.AFDEndpointProtocolsHTTP -1. AFDEndpointProtocols.AFDEndpointProtocolsHTTPS -1. ActionType.ActionTypeAllow -1. ActionType.ActionTypeBlock -1. ActionType.ActionTypeLog -1. ActionType.ActionTypeRedirect -1. AfdMinimumTLSVersion.AfdMinimumTLSVersionTLS10 -1. AfdMinimumTLSVersion.AfdMinimumTLSVersionTLS12 -1. AfdProvisioningState.AfdProvisioningStateCreating -1. AfdProvisioningState.AfdProvisioningStateDeleting -1. AfdProvisioningState.AfdProvisioningStateFailed -1. AfdProvisioningState.AfdProvisioningStateSucceeded -1. AfdProvisioningState.AfdProvisioningStateUpdating -1. AfdQueryStringCachingBehavior.AfdQueryStringCachingBehaviorIgnoreQueryString -1. AfdQueryStringCachingBehavior.AfdQueryStringCachingBehaviorNotSet -1. AfdQueryStringCachingBehavior.AfdQueryStringCachingBehaviorUseQueryString -1. Algorithm.AlgorithmSHA256 -1. CacheBehavior.CacheBehaviorBypassCache -1. CacheBehavior.CacheBehaviorOverride -1. CacheBehavior.CacheBehaviorSetIfMissing -1. CertificateType.CertificateTypeDedicated -1. CertificateType.CertificateTypeShared -1. CookiesOperator.CookiesOperatorAny -1. CookiesOperator.CookiesOperatorBeginsWith -1. CookiesOperator.CookiesOperatorContains -1. CookiesOperator.CookiesOperatorEndsWith -1. CookiesOperator.CookiesOperatorEqual -1. CookiesOperator.CookiesOperatorGreaterThan -1. CookiesOperator.CookiesOperatorGreaterThanOrEqual -1. CookiesOperator.CookiesOperatorLessThan -1. CookiesOperator.CookiesOperatorLessThanOrEqual -1. CookiesOperator.CookiesOperatorRegEx -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateCertificateDeleted -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateCertificateDeployed -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateDeletingCertificate -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateDeployingCertificate -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateIssuingCertificate -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval -1. CustomHTTPSProvisioningSubstate.CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest -1. CustomRuleEnabledState.CustomRuleEnabledStateDisabled -1. CustomRuleEnabledState.CustomRuleEnabledStateEnabled -1. DomainValidationState.DomainValidationStateApproved -1. DomainValidationState.DomainValidationStatePending -1. DomainValidationState.DomainValidationStatePendingRevalidation -1. DomainValidationState.DomainValidationStateSubmitting -1. DomainValidationState.DomainValidationStateTimedOut -1. DomainValidationState.DomainValidationStateUnknown -1. ForwardingProtocol.ForwardingProtocolHTTPOnly -1. ForwardingProtocol.ForwardingProtocolHTTPSOnly -1. ForwardingProtocol.ForwardingProtocolMatchRequest -1. Granularity.GranularityP1D -1. Granularity.GranularityPT1H -1. Granularity.GranularityPT5M -1. HeaderAction.HeaderActionAppend -1. HeaderAction.HeaderActionDelete -1. HeaderAction.HeaderActionOverwrite -1. IdentityType.IdentityTypeApplication -1. IdentityType.IdentityTypeKey -1. IdentityType.IdentityTypeManagedIdentity -1. IdentityType.IdentityTypeUser -1. LogMetric.LogMetricClientRequestBandwidth -1. LogMetric.LogMetricClientRequestCount -1. LogMetric.LogMetricClientRequestTraffic -1. LogMetric.LogMetricOriginRequestBandwidth -1. LogMetric.LogMetricOriginRequestTraffic -1. LogMetric.LogMetricTotalLatency -1. LogMetricsGranularity.LogMetricsGranularityP1D -1. LogMetricsGranularity.LogMetricsGranularityPT1H -1. LogMetricsGranularity.LogMetricsGranularityPT5M -1. LogMetricsGroupBy.LogMetricsGroupByCacheStatus -1. LogMetricsGroupBy.LogMetricsGroupByCountry -1. LogMetricsGroupBy.LogMetricsGroupByCustomDomain -1. LogMetricsGroupBy.LogMetricsGroupByHTTPStatusCode -1. LogMetricsGroupBy.LogMetricsGroupByProtocol -1. LogRanking.LogRankingBrowser -1. LogRanking.LogRankingCountryOrRegion -1. LogRanking.LogRankingReferrer -1. LogRanking.LogRankingURL -1. LogRanking.LogRankingUserAgent -1. LogRankingMetric.LogRankingMetricClientRequestCount -1. LogRankingMetric.LogRankingMetricClientRequestTraffic -1. LogRankingMetric.LogRankingMetricErrorCount -1. LogRankingMetric.LogRankingMetricHitCount -1. LogRankingMetric.LogRankingMetricMissCount -1. LogRankingMetric.LogRankingMetricUserErrorCount -1. MatchProcessingBehavior.MatchProcessingBehaviorContinue -1. MatchProcessingBehavior.MatchProcessingBehaviorStop -1. MatchVariable.MatchVariableCookies -1. MatchVariable.MatchVariablePostArgs -1. MatchVariable.MatchVariableQueryString -1. MatchVariable.MatchVariableRemoteAddr -1. MatchVariable.MatchVariableRequestBody -1. MatchVariable.MatchVariableRequestHeader -1. MatchVariable.MatchVariableRequestMethod -1. MatchVariable.MatchVariableRequestURI -1. MatchVariable.MatchVariableSocketAddr -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameCacheExpiration -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameCacheKeyQueryString -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameDeliveryRuleAction -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameModifyRequestHeader -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameModifyResponseHeader -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameOriginGroupOverride -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameURLRedirect -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameURLRewrite -1. NameBasicDeliveryRuleAction.NameBasicDeliveryRuleActionNameURLSigning -1. OptimizationType.OptimizationTypeDynamicSiteAcceleration -1. OptimizationType.OptimizationTypeGeneralMediaStreaming -1. OptimizationType.OptimizationTypeGeneralWebDelivery -1. OptimizationType.OptimizationTypeLargeFileDownload -1. OptimizationType.OptimizationTypeVideoOnDemandMediaStreaming -1. ParamIndicator.ParamIndicatorExpires -1. ParamIndicator.ParamIndicatorKeyID -1. ParamIndicator.ParamIndicatorSignature -1. PolicyMode.PolicyModeDetection -1. PolicyMode.PolicyModePrevention -1. ProtocolType.ProtocolTypeIPBased -1. ProtocolType.ProtocolTypeServerNameIndication -1. QueryStringBehavior.QueryStringBehaviorExclude -1. QueryStringBehavior.QueryStringBehaviorExcludeAll -1. QueryStringBehavior.QueryStringBehaviorInclude -1. QueryStringBehavior.QueryStringBehaviorIncludeAll -1. RedirectType.RedirectTypeFound -1. RedirectType.RedirectTypeMoved -1. RedirectType.RedirectTypePermanentRedirect -1. RedirectType.RedirectTypeTemporaryRedirect -1. ResourceType.ResourceTypeMicrosoftCdnProfilesEndpoints -1. ResponseBasedDetectedErrorTypes.ResponseBasedDetectedErrorTypesNone -1. ResponseBasedDetectedErrorTypes.ResponseBasedDetectedErrorTypesTCPAndHTTPErrors -1. ResponseBasedDetectedErrorTypes.ResponseBasedDetectedErrorTypesTCPErrorsOnly -1. SkuName.SkuNameCustomVerizon -1. SkuName.SkuNamePremiumAzureFrontDoor -1. SkuName.SkuNamePremiumChinaCdn -1. SkuName.SkuNamePremiumVerizon -1. SkuName.SkuNameStandard955BandWidthChinaCdn -1. SkuName.SkuNameStandardAkamai -1. SkuName.SkuNameStandardAvgBandWidthChinaCdn -1. SkuName.SkuNameStandardAzureFrontDoor -1. SkuName.SkuNameStandardChinaCdn -1. SkuName.SkuNameStandardMicrosoft -1. SkuName.SkuNameStandardPlus955BandWidthChinaCdn -1. SkuName.SkuNameStandardPlusAvgBandWidthChinaCdn -1. SkuName.SkuNameStandardPlusChinaCdn -1. SkuName.SkuNameStandardVerizon -1. Status.StatusAccessDenied -1. Status.StatusCertificateExpired -1. Status.StatusInvalid -1. Status.StatusValid -1. Transform.TransformLowercase -1. Transform.TransformUppercase -1. TypeBasicSecretParameters.TypeBasicSecretParametersTypeCustomerCertificate -1. TypeBasicSecretParameters.TypeBasicSecretParametersTypeManagedCertificate -1. TypeBasicSecretParameters.TypeBasicSecretParametersTypeSecretParameters -1. TypeBasicSecretParameters.TypeBasicSecretParametersTypeURLSigningKey -1. Unit.UnitBitsPerSecond -1. Unit.UnitBytes -1. Unit.UnitCount -1. WafAction.WafActionAllow -1. WafAction.WafActionBlock -1. WafAction.WafActionLog -1. WafAction.WafActionRedirect -1. WafGranularity.WafGranularityP1D -1. WafGranularity.WafGranularityPT1H -1. WafGranularity.WafGranularityPT5M -1. WafMetric.WafMetricClientRequestCount -1. WafRankingGroupBy.WafRankingGroupByCustomDomain -1. WafRankingGroupBy.WafRankingGroupByHTTPStatusCode -1. WafRankingType.WafRankingTypeAction -1. WafRankingType.WafRankingTypeClientIP -1. WafRankingType.WafRankingTypeCountry -1. WafRankingType.WafRankingTypeRuleGroup -1. WafRankingType.WafRankingTypeRuleID -1. WafRankingType.WafRankingTypeRuleType -1. WafRankingType.WafRankingTypeURL -1. WafRankingType.WafRankingTypeUserAgent -1. WafRuleType.WafRuleTypeBot -1. WafRuleType.WafRuleTypeCustom -1. WafRuleType.WafRuleTypeManaged - -### New Funcs - -1. *CustomDomainProperties.UnmarshalJSON([]byte) error -1. *CustomDomainsDisableCustomHTTPSFuture.UnmarshalJSON([]byte) error -1. *CustomDomainsEnableCustomHTTPSFuture.UnmarshalJSON([]byte) error -1. PossibleLogMetricValues() []LogMetric -1. PossibleLogMetricsGranularityValues() []LogMetricsGranularity -1. PossibleLogMetricsGroupByValues() []LogMetricsGroupBy -1. PossibleLogRankingMetricValues() []LogRankingMetric -1. PossibleLogRankingValues() []LogRanking -1. PossibleWafActionValues() []WafAction -1. PossibleWafGranularityValues() []WafGranularity -1. PossibleWafMetricValues() []WafMetric -1. PossibleWafRankingGroupByValues() []WafRankingGroupBy -1. PossibleWafRankingTypeValues() []WafRankingType -1. PossibleWafRuleTypeValues() []WafRuleType - -### Struct Changes - -#### New Structs - -1. CustomDomainsDisableCustomHTTPSFuture -1. CustomDomainsEnableCustomHTTPSFuture - -#### New Struct Fields - -1. CustomDomainProperties.CustomHTTPSParameters -1. ManagedRuleSetDefinition.SystemData -1. Resource.SystemData +1. Transform.TransformRemoveNulls +1. Transform.TransformTrim +1. Transform.TransformURLDecode +1. Transform.TransformURLEncode diff --git a/services/cdn/mgmt/2020-09-01/cdn/_meta.json b/services/cdn/mgmt/2020-09-01/cdn/_meta.json index 339c0c5ef33d..fbb9d6d8881c 100644 --- a/services/cdn/mgmt/2020-09-01/cdn/_meta.json +++ b/services/cdn/mgmt/2020-09-01/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "2b56c8a3da0e04aea6f6d80a9ac04741d1ae5904", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2020-09", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2020-09-01/cdn/enums.go b/services/cdn/mgmt/2020-09-01/cdn/enums.go index f4de58dfdcea..9ab60c03fd3c 100644 --- a/services/cdn/mgmt/2020-09-01/cdn/enums.go +++ b/services/cdn/mgmt/2020-09-01/cdn/enums.go @@ -1375,13 +1375,21 @@ type Transform string const ( // TransformLowercase ... TransformLowercase Transform = "Lowercase" + // TransformRemoveNulls ... + TransformRemoveNulls Transform = "RemoveNulls" + // TransformTrim ... + TransformTrim Transform = "Trim" // TransformUppercase ... TransformUppercase Transform = "Uppercase" + // TransformURLDecode ... + TransformURLDecode Transform = "UrlDecode" + // TransformURLEncode ... + TransformURLEncode Transform = "UrlEncode" ) // PossibleTransformValues returns an array of possible values for the Transform const type. func PossibleTransformValues() []Transform { - return []Transform{TransformLowercase, TransformUppercase} + return []Transform{TransformLowercase, TransformRemoveNulls, TransformTrim, TransformUppercase, TransformURLDecode, TransformURLEncode} } // TransformType enumerates the values for transform type. diff --git a/services/cdn/mgmt/2020-09-01/cdn/models.go b/services/cdn/mgmt/2020-09-01/cdn/models.go index f9abf6dade3c..92b555417ee0 100644 --- a/services/cdn/mgmt/2020-09-01/cdn/models.go +++ b/services/cdn/mgmt/2020-09-01/cdn/models.go @@ -1803,7 +1803,7 @@ type AFDOriginProperties struct { // Weight - Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 Weight *int32 `json:"weight,omitempty"` // SharedPrivateLinkResource - The properties of the private link resource for private origin. - SharedPrivateLinkResource interface{} `json:"sharedPrivateLinkResource,omitempty"` + SharedPrivateLinkResource *SharedPrivateLinkResourceProperties `json:"sharedPrivateLinkResource,omitempty"` // EnabledState - Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. Possible values include: 'EnabledStateEnabled', 'EnabledStateDisabled' EnabledState EnabledState `json:"enabledState,omitempty"` // ProvisioningState - READ-ONLY; Provisioning status. Possible values include: 'AfdProvisioningStateSucceeded', 'AfdProvisioningStateFailed', 'AfdProvisioningStateUpdating', 'AfdProvisioningStateDeleting', 'AfdProvisioningStateCreating' @@ -2023,7 +2023,7 @@ type AFDOriginUpdatePropertiesParameters struct { // Weight - Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 Weight *int32 `json:"weight,omitempty"` // SharedPrivateLinkResource - The properties of the private link resource for private origin. - SharedPrivateLinkResource interface{} `json:"sharedPrivateLinkResource,omitempty"` + SharedPrivateLinkResource *SharedPrivateLinkResourceProperties `json:"sharedPrivateLinkResource,omitempty"` // EnabledState - Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. Possible values include: 'EnabledStateEnabled', 'EnabledStateDisabled' EnabledState EnabledState `json:"enabledState,omitempty"` } @@ -9369,7 +9369,7 @@ type RouteProperties struct { // PatternsToMatch - The route patterns of the rule. PatternsToMatch *[]string `json:"patternsToMatch,omitempty"` // CompressionSettings - compression settings. - CompressionSettings interface{} `json:"compressionSettings,omitempty"` + CompressionSettings *CompressionSettings `json:"compressionSettings,omitempty"` // QueryStringCachingBehavior - Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. Possible values include: 'AfdQueryStringCachingBehaviorIgnoreQueryString', 'AfdQueryStringCachingBehaviorUseQueryString', 'AfdQueryStringCachingBehaviorNotSet' QueryStringCachingBehavior AfdQueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` // ForwardingProtocol - Protocol this rule will use when forwarding traffic to backends. Possible values include: 'ForwardingProtocolHTTPOnly', 'ForwardingProtocolHTTPSOnly', 'ForwardingProtocolMatchRequest' @@ -9601,7 +9601,7 @@ type RouteUpdatePropertiesParameters struct { // PatternsToMatch - The route patterns of the rule. PatternsToMatch *[]string `json:"patternsToMatch,omitempty"` // CompressionSettings - compression settings. - CompressionSettings interface{} `json:"compressionSettings,omitempty"` + CompressionSettings *CompressionSettings `json:"compressionSettings,omitempty"` // QueryStringCachingBehavior - Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. Possible values include: 'AfdQueryStringCachingBehaviorIgnoreQueryString', 'AfdQueryStringCachingBehaviorUseQueryString', 'AfdQueryStringCachingBehaviorNotSet' QueryStringCachingBehavior AfdQueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` // ForwardingProtocol - Protocol this rule will use when forwarding traffic to backends. Possible values include: 'ForwardingProtocolHTTPOnly', 'ForwardingProtocolHTTPSOnly', 'ForwardingProtocolMatchRequest' diff --git a/services/cdn/mgmt/2021-06-01/cdn/CHANGELOG.md b/services/cdn/mgmt/2021-06-01/cdn/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/cdn/mgmt/2021-06-01/cdn/CHANGELOG.md +++ b/services/cdn/mgmt/2021-06-01/cdn/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/cdn/mgmt/2021-06-01/cdn/_meta.json b/services/cdn/mgmt/2021-06-01/cdn/_meta.json index 32850ce6dba4..b3106bbd8b9f 100644 --- a/services/cdn/mgmt/2021-06-01/cdn/_meta.json +++ b/services/cdn/mgmt/2021-06-01/cdn/_meta.json @@ -1,5 +1,5 @@ { - "commit": "162460648e39b3cd20ef3d302008add138e90223", + "commit": "1278b951080f769d400bb5d03090de8bc21dc355", "readme": "/_/azure-rest-api-specs/specification/cdn/resource-manager/readme.md", "tag": "package-2021-06", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/cdn/mgmt/2021-06-01/cdn/afdendpoints.go b/services/cdn/mgmt/2021-06-01/cdn/afdendpoints.go index eee6e78a71e7..a00e6aae31fb 100644 --- a/services/cdn/mgmt/2021-06-01/cdn/afdendpoints.go +++ b/services/cdn/mgmt/2021-06-01/cdn/afdendpoints.go @@ -430,7 +430,8 @@ func (client AFDEndpointsClient) ListByProfileComplete(ctx context.Context, reso return } -// ListResourceUsage checks the quota and actual usage of endpoints under the given CDN profile. +// ListResourceUsage checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN +// profile. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. // profileName - name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique @@ -751,7 +752,8 @@ func (client AFDEndpointsClient) UpdateResponder(resp *http.Response) (result AF return } -// ValidateCustomDomain validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. +// ValidateCustomDomain validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This +// api isn't work for apex domain. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. // profileName - name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique diff --git a/services/cdn/mgmt/2021-06-01/cdn/afdorigingroups.go b/services/cdn/mgmt/2021-06-01/cdn/afdorigingroups.go index 486e003e6d86..3ad13acf76d3 100644 --- a/services/cdn/mgmt/2021-06-01/cdn/afdorigingroups.go +++ b/services/cdn/mgmt/2021-06-01/cdn/afdorigingroups.go @@ -440,7 +440,8 @@ func (client AFDOriginGroupsClient) ListByProfileComplete(ctx context.Context, r return } -// ListResourceUsage checks the quota and actual usage of endpoints under the given CDN profile. +// ListResourceUsage checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN +// profile. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. // profileName - name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique diff --git a/services/cdn/mgmt/2021-06-01/cdn/afdprofiles.go b/services/cdn/mgmt/2021-06-01/cdn/afdprofiles.go index 25f3434c4600..893e7cba3c10 100644 --- a/services/cdn/mgmt/2021-06-01/cdn/afdprofiles.go +++ b/services/cdn/mgmt/2021-06-01/cdn/afdprofiles.go @@ -31,7 +31,7 @@ func NewAFDProfilesClientWithBaseURI(baseURI string, subscriptionID string) AFDP return AFDProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckHostNameAvailability validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. +// CheckHostNameAvailability check the name availability of a host name. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. // profileName - name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is @@ -121,7 +121,7 @@ func (client AFDProfilesClient) CheckHostNameAvailabilityResponder(resp *http.Re return } -// ListResourceUsage checks the quota and actual usage of endpoints under the given CDN profile. +// ListResourceUsage checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. // profileName - name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is diff --git a/services/cdn/mgmt/2021-06-01/cdn/models.go b/services/cdn/mgmt/2021-06-01/cdn/models.go index 78382b6cd1e0..17416f5239ff 100644 --- a/services/cdn/mgmt/2021-06-01/cdn/models.go +++ b/services/cdn/mgmt/2021-06-01/cdn/models.go @@ -14199,7 +14199,7 @@ func (vpo ValidateProbeOutput) MarshalJSON() ([]byte, error) { type ValidateSecretInput struct { // SecretType - The secret type. Possible values include: 'SecretTypeURLSigningKey', 'SecretTypeCustomerCertificate', 'SecretTypeManagedCertificate', 'SecretTypeAzureFirstPartyManagedCertificate' SecretType SecretType `json:"secretType,omitempty"` - // SecretSource - Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + // SecretSource - Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​���​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ SecretSource *ResourceReference `json:"secretSource,omitempty"` // SecretVersion - Secret version, if customer is using a specific version. SecretVersion *string `json:"secretVersion,omitempty"` diff --git a/services/cdn/mgmt/2021-06-01/cdn/rulesets.go b/services/cdn/mgmt/2021-06-01/cdn/rulesets.go index b42a1bf78c3c..13b56d111a90 100644 --- a/services/cdn/mgmt/2021-06-01/cdn/rulesets.go +++ b/services/cdn/mgmt/2021-06-01/cdn/rulesets.go @@ -423,7 +423,8 @@ func (client RuleSetsClient) ListByProfileComplete(ctx context.Context, resource return } -// ListResourceUsage checks the quota and actual usage of endpoints under the given CDN profile. +// ListResourceUsage checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN +// profile. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. // profileName - name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique