diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md b/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md index 99a7014a8b6e..3b0bd34af6d6 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/CHANGELOG.md @@ -1,5 +1,23 @@ # Release History +## 0.6.0 (2022-05-30) +### Breaking Changes + +- Type of `WorkbookUpdateParameters.Kind` has been changed from `*SharedTypeKind` to `*WorkbookUpdateSharedTypeKind` +- Type of `WorkbookResource.Kind` has been changed from `*Kind` to `*WorkbookSharedTypeKind` +- Type of `Workbook.Kind` has been changed from `*Kind` to `*WorkbookSharedTypeKind` +- Const `SharedTypeKindUser` has been removed +- Const `SharedTypeKindShared` has been removed +- Function `PossibleSharedTypeKindValues` has been removed + +### Features Added + +- New const `WorkbookSharedTypeKindShared` +- New const `WorkbookUpdateSharedTypeKindShared` +- New function `PossibleWorkbookSharedTypeKindValues() []WorkbookSharedTypeKind` +- New function `PossibleWorkbookUpdateSharedTypeKindValues() []WorkbookUpdateSharedTypeKind` + + ## 0.5.0 (2022-05-17) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 0.5.0, which contains breaking changes. diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md b/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md index 4d0fd7d46626..59c2ee78ce7f 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/applicationinsights/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/applicationinsights/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/078b90617e5e08137d0395963bd4119f4561a910/specification/applicationinsights/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/078b90617e5e08137d0395963bd4119f4561a910/specification/applicationinsights/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.5.0 +module-version: 0.6.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/ze_generated_example_workbooks_client_test.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/ze_generated_example_workbooks_client_test.go index 34838b22aad7..bfa50bc5d435 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/ze_generated_example_workbooks_client_test.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/ze_generated_example_workbooks_client_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList2.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList2.json func ExampleWorkbooksClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -44,7 +44,7 @@ func ExampleWorkbooksClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList.json func ExampleWorkbooksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -73,7 +73,7 @@ func ExampleWorkbooksClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json func ExampleWorkbooksClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -95,7 +95,7 @@ func ExampleWorkbooksClient_Get() { _ = res } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookDelete.json func ExampleWorkbooksClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -115,7 +115,7 @@ func ExampleWorkbooksClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookAdd.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookAdd.json func ExampleWorkbooksClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -135,7 +135,7 @@ func ExampleWorkbooksClient_CreateOrUpdate() { "TagSample01": to.Ptr("sample01"), "TagSample02": to.Ptr("sample02"), }, - Kind: to.Ptr(armapplicationinsights.KindShared), + Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared), Properties: &armapplicationinsights.WorkbookProperties{ Description: to.Ptr("Sample workbook"), Category: to.Ptr("workbook"), @@ -151,7 +151,7 @@ func ExampleWorkbooksClient_CreateOrUpdate() { _ = res } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedUpdate.json func ExampleWorkbooksClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -173,7 +173,7 @@ func ExampleWorkbooksClient_Update() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionsList.json func ExampleWorkbooksClient_NewRevisionsListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -199,7 +199,7 @@ func ExampleWorkbooksClient_NewRevisionsListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json func ExampleWorkbooksClient_RevisionGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_constants.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_constants.go index 2558645146dd..6efcd7a0d5f5 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_constants.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_constants.go @@ -10,7 +10,7 @@ package armapplicationinsights const ( moduleName = "armapplicationinsights" - moduleVersion = "v0.5.0" + moduleVersion = "v0.6.0" ) // ApplicationType - Type of application being monitored. @@ -320,22 +320,6 @@ func PossibleRequestSourceValues() []RequestSource { } } -// SharedTypeKind - The kind of workbook. Only valid value is shared. -type SharedTypeKind string - -const ( - SharedTypeKindShared SharedTypeKind = "shared" - SharedTypeKindUser SharedTypeKind = "user" -) - -// PossibleSharedTypeKindValues returns the possible values for the SharedTypeKind const type. -func PossibleSharedTypeKindValues() []SharedTypeKind { - return []SharedTypeKind{ - SharedTypeKindShared, - SharedTypeKindUser, - } -} - type StorageType string const ( @@ -364,3 +348,31 @@ func PossibleWebTestKindValues() []WebTestKind { WebTestKindMultistep, } } + +// WorkbookSharedTypeKind - The kind of workbook. Only valid value is shared. +type WorkbookSharedTypeKind string + +const ( + WorkbookSharedTypeKindShared WorkbookSharedTypeKind = "shared" +) + +// PossibleWorkbookSharedTypeKindValues returns the possible values for the WorkbookSharedTypeKind const type. +func PossibleWorkbookSharedTypeKindValues() []WorkbookSharedTypeKind { + return []WorkbookSharedTypeKind{ + WorkbookSharedTypeKindShared, + } +} + +// WorkbookUpdateSharedTypeKind - The kind of workbook. Only valid value is shared. +type WorkbookUpdateSharedTypeKind string + +const ( + WorkbookUpdateSharedTypeKindShared WorkbookUpdateSharedTypeKind = "shared" +) + +// PossibleWorkbookUpdateSharedTypeKindValues returns the possible values for the WorkbookUpdateSharedTypeKind const type. +func PossibleWorkbookUpdateSharedTypeKindValues() []WorkbookUpdateSharedTypeKind { + return []WorkbookUpdateSharedTypeKind{ + WorkbookUpdateSharedTypeKindShared, + } +} diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_models.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_models.go index ed70a5003051..b6f1efde4a1a 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_models.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_models.go @@ -1583,7 +1583,7 @@ type WorkItemCreateConfiguration struct { WorkItemProperties map[string]*string `json:"WorkItemProperties,omitempty"` } -// Workbook - An Application Insights workbook definition. +// Workbook - A workbook definition. type Workbook struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` @@ -1595,7 +1595,7 @@ type Workbook struct { Identity *WorkbookResourceIdentity `json:"identity,omitempty"` // The kind of workbook. Only valid value is shared. - Kind *Kind `json:"kind,omitempty"` + Kind *WorkbookSharedTypeKind `json:"kind,omitempty"` // Metadata describing a workbook for an Azure resource. Properties *WorkbookProperties `json:"properties,omitempty"` @@ -1709,7 +1709,7 @@ type WorkbookResource struct { Identity *WorkbookResourceIdentity `json:"identity,omitempty"` // The kind of workbook. Only valid value is shared. - Kind *Kind `json:"kind,omitempty"` + Kind *WorkbookSharedTypeKind `json:"kind,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` @@ -1904,7 +1904,7 @@ type WorkbookTemplatesListResult struct { // WorkbookUpdateParameters - The parameters that can be provided when updating workbook properties properties. type WorkbookUpdateParameters struct { // The kind of workbook. Only valid value is shared. - Kind *SharedTypeKind `json:"kind,omitempty"` + Kind *WorkbookUpdateSharedTypeKind `json:"kind,omitempty"` // Metadata describing a workbook for an Azure resource. Properties *WorkbookPropertiesUpdateParameters `json:"properties,omitempty"` diff --git a/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_workbooks_client.go b/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_workbooks_client.go index 1c57d4dca316..2b1690ce5b0a 100644 --- a/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_workbooks_client.go +++ b/sdk/resourcemanager/applicationinsights/armapplicationinsights/zz_generated_workbooks_client.go @@ -57,9 +57,9 @@ func NewWorkbooksClient(subscriptionID string, credential azcore.TokenCredential // CreateOrUpdate - Create a new workbook. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-04-01 // resourceGroupName - The name of the resource group. The name is case insensitive. -// resourceName - The name of the Application Insights component resource. +// resourceName - The name of the resource. // workbookProperties - Properties that need to be specified to create a new workbook. // options - WorkbooksClientCreateOrUpdateOptions contains the optional parameters for the WorkbooksClient.CreateOrUpdate // method. @@ -101,7 +101,7 @@ func (client *WorkbooksClient) createOrUpdateCreateRequest(ctx context.Context, if options != nil && options.SourceID != nil { reqQP.Set("sourceId", *options.SourceID) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, workbookProperties) @@ -118,9 +118,9 @@ func (client *WorkbooksClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Delete a workbook. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-04-01 // resourceGroupName - The name of the resource group. The name is case insensitive. -// resourceName - The name of the Application Insights component resource. +// resourceName - The name of the resource. // options - WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method. func (client *WorkbooksClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientDeleteOptions) (WorkbooksClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -157,7 +157,7 @@ func (client *WorkbooksClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,9 +165,9 @@ func (client *WorkbooksClient) deleteCreateRequest(ctx context.Context, resource // Get - Get a single workbook by its resourceName. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-04-01 // resourceGroupName - The name of the resource group. The name is case insensitive. -// resourceName - The name of the Application Insights component resource. +// resourceName - The name of the resource. // options - WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method. func (client *WorkbooksClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientGetOptions) (WorkbooksClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -204,7 +204,7 @@ func (client *WorkbooksClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-04-01") if options != nil && options.CanFetchContent != nil { reqQP.Set("canFetchContent", strconv.FormatBool(*options.CanFetchContent)) } @@ -224,7 +224,7 @@ func (client *WorkbooksClient) getHandleResponse(resp *http.Response) (Workbooks // NewListByResourceGroupPager - Get all Workbooks defined within a specified resource group and category. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-04-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // category - Category of workbook to return. // options - WorkbooksClientListByResourceGroupOptions contains the optional parameters for the WorkbooksClient.ListByResourceGroup @@ -283,7 +283,7 @@ func (client *WorkbooksClient) listByResourceGroupCreateRequest(ctx context.Cont if options != nil && options.CanFetchContent != nil { reqQP.Set("canFetchContent", strconv.FormatBool(*options.CanFetchContent)) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -300,7 +300,7 @@ func (client *WorkbooksClient) listByResourceGroupHandleResponse(resp *http.Resp // NewListBySubscriptionPager - Get all Workbooks defined within a specified subscription and category. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-04-01 // category - Category of workbook to return. // options - WorkbooksClientListBySubscriptionOptions contains the optional parameters for the WorkbooksClient.ListBySubscription // method. @@ -351,7 +351,7 @@ func (client *WorkbooksClient) listBySubscriptionCreateRequest(ctx context.Conte if options != nil && options.CanFetchContent != nil { reqQP.Set("canFetchContent", strconv.FormatBool(*options.CanFetchContent)) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -368,9 +368,9 @@ func (client *WorkbooksClient) listBySubscriptionHandleResponse(resp *http.Respo // RevisionGet - Get a single workbook revision defined by its revisionId. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-04-01 // resourceGroupName - The name of the resource group. The name is case insensitive. -// resourceName - The name of the Application Insights component resource. +// resourceName - The name of the resource. // revisionID - The id of the workbook's revision. // options - WorkbooksClientRevisionGetOptions contains the optional parameters for the WorkbooksClient.RevisionGet method. func (client *WorkbooksClient) RevisionGet(ctx context.Context, resourceGroupName string, resourceName string, revisionID string, options *WorkbooksClientRevisionGetOptions) (WorkbooksClientRevisionGetResponse, error) { @@ -412,7 +412,7 @@ func (client *WorkbooksClient) revisionGetCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -429,9 +429,9 @@ func (client *WorkbooksClient) revisionGetHandleResponse(resp *http.Response) (W // NewRevisionsListPager - Get the revisions for the workbook defined by its resourceName. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-04-01 // resourceGroupName - The name of the resource group. The name is case insensitive. -// resourceName - The name of the Application Insights component resource. +// resourceName - The name of the resource. // options - WorkbooksClientRevisionsListOptions contains the optional parameters for the WorkbooksClient.RevisionsList method. func (client *WorkbooksClient) NewRevisionsListPager(resourceGroupName string, resourceName string, options *WorkbooksClientRevisionsListOptions) *runtime.Pager[WorkbooksClientRevisionsListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkbooksClientRevisionsListResponse]{ @@ -481,7 +481,7 @@ func (client *WorkbooksClient) revisionsListCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -498,9 +498,9 @@ func (client *WorkbooksClient) revisionsListHandleResponse(resp *http.Response) // Update - Updates a workbook that has already been added. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-04-01 // resourceGroupName - The name of the resource group. The name is case insensitive. -// resourceName - The name of the Application Insights component resource. +// resourceName - The name of the resource. // options - WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method. func (client *WorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientUpdateOptions) (WorkbooksClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -540,7 +540,7 @@ func (client *WorkbooksClient) updateCreateRequest(ctx context.Context, resource if options != nil && options.SourceID != nil { reqQP.Set("sourceId", *options.SourceID) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.WorkbookUpdateParameters != nil {