Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto PR: Regenerating the Go SDK (6c3790843808805f2655c77277efe7f2cc4cbf08) #883

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions resource-manager/elastic/2024-03-01/apikey/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/apikey` Documentation

The `apikey` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`).

This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs).

### Import Path

```go
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/apikey"
```


### Client Initialization

```go
client := apikey.NewApiKeyClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
```


### Example Usage: `ApiKeyClient.OrganizationsGetApiKey`

```go
ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

payload := apikey.UserEmailId{
// ...
}


read, err := client.OrganizationsGetApiKey(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```
26 changes: 26 additions & 0 deletions resource-manager/elastic/2024-03-01/apikey/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package apikey

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type ApiKeyClient struct {
Client *resourcemanager.Client
}

func NewApiKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiKeyClient, error) {
client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apikey", defaultApiVersion)
if err != nil {
return nil, fmt.Errorf("instantiating ApiKeyClient: %+v", err)
}

return &ApiKeyClient{
Client: client,
}, nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package apikey

import (
"context"
"fmt"
"net/http"

"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-sdk/sdk/client"
"github.com/hashicorp/go-azure-sdk/sdk/odata"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type OrganizationsGetApiKeyOperationResponse struct {
HttpResponse *http.Response
OData *odata.OData
Model *UserApiKeyResponse
}

// OrganizationsGetApiKey ...
func (c ApiKeyClient) OrganizationsGetApiKey(ctx context.Context, id commonids.SubscriptionId, input UserEmailId) (result OrganizationsGetApiKeyOperationResponse, err error) {
opts := client.RequestOptions{
ContentType: "application/json; charset=utf-8",
ExpectedStatusCodes: []int{
http.StatusOK,
},
HttpMethod: http.MethodPost,
Path: fmt.Sprintf("%s/providers/Microsoft.Elastic/getOrganizationApiKey", id.ID()),
}

req, err := c.Client.NewRequest(ctx, opts)
if err != nil {
return
}

if err = req.Marshal(input); err != nil {
return
}

var resp *client.Response
resp, err = req.Execute(ctx)
if resp != nil {
result.OData = resp.OData
result.HttpResponse = resp.Response
}
if err != nil {
return
}

if err = resp.Unmarshal(&result.Model); err != nil {
return
}

return
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package apikey

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type UserApiKeyResponse struct {
Properties *UserApiKeyResponseProperties `json:"properties,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package apikey

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type UserApiKeyResponseProperties struct {
ApiKey *string `json:"apiKey,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package apikey

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type UserEmailId struct {
EmailId *string `json:"emailId,omitempty"`
}
12 changes: 12 additions & 0 deletions resource-manager/elastic/2024-03-01/apikey/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package apikey

import "fmt"

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

const defaultApiVersion = "2024-03-01"

func userAgent() string {
return fmt.Sprintf("hashicorp/go-azure-sdk/apikey/%s", defaultApiVersion)
}
154 changes: 154 additions & 0 deletions resource-manager/elastic/2024-03-01/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
package v2024_03_01

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/apikey"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/connectedresources"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/deploymentinfo"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/deploymentupdate"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/elasticversions"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/monitoredresources"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/monitorsresource"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/monitorupgradableversions"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/openaiintegration"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/rules"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/trafficfilter"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/userorganization"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/vmcollectionupdate"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/vmhhostlist"
"github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/vmingestiondetails"
"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments"
)

type Client struct {
ApiKey *apikey.ApiKeyClient
ConnectedResources *connectedresources.ConnectedResourcesClient
DeploymentInfo *deploymentinfo.DeploymentInfoClient
DeploymentUpdate *deploymentupdate.DeploymentUpdateClient
ElasticVersions *elasticversions.ElasticVersionsClient
MonitorUpgradableVersions *monitorupgradableversions.MonitorUpgradableVersionsClient
MonitoredResources *monitoredresources.MonitoredResourcesClient
MonitorsResource *monitorsresource.MonitorsResourceClient
OpenAIIntegration *openaiintegration.OpenAIIntegrationClient
Rules *rules.RulesClient
TrafficFilter *trafficfilter.TrafficFilterClient
UserOrganization *userorganization.UserOrganizationClient
VMCollectionUpdate *vmcollectionupdate.VMCollectionUpdateClient
VMHHostList *vmhhostlist.VMHHostListClient
VMIngestionDetails *vmingestiondetails.VMIngestionDetailsClient
}

func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) {
apiKeyClient, err := apikey.NewApiKeyClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building ApiKey client: %+v", err)
}
configureFunc(apiKeyClient.Client)

connectedResourcesClient, err := connectedresources.NewConnectedResourcesClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building ConnectedResources client: %+v", err)
}
configureFunc(connectedResourcesClient.Client)

deploymentInfoClient, err := deploymentinfo.NewDeploymentInfoClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building DeploymentInfo client: %+v", err)
}
configureFunc(deploymentInfoClient.Client)

deploymentUpdateClient, err := deploymentupdate.NewDeploymentUpdateClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building DeploymentUpdate client: %+v", err)
}
configureFunc(deploymentUpdateClient.Client)

elasticVersionsClient, err := elasticversions.NewElasticVersionsClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building ElasticVersions client: %+v", err)
}
configureFunc(elasticVersionsClient.Client)

monitorUpgradableVersionsClient, err := monitorupgradableversions.NewMonitorUpgradableVersionsClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building MonitorUpgradableVersions client: %+v", err)
}
configureFunc(monitorUpgradableVersionsClient.Client)

monitoredResourcesClient, err := monitoredresources.NewMonitoredResourcesClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building MonitoredResources client: %+v", err)
}
configureFunc(monitoredResourcesClient.Client)

monitorsResourceClient, err := monitorsresource.NewMonitorsResourceClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building MonitorsResource client: %+v", err)
}
configureFunc(monitorsResourceClient.Client)

openAIIntegrationClient, err := openaiintegration.NewOpenAIIntegrationClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building OpenAIIntegration client: %+v", err)
}
configureFunc(openAIIntegrationClient.Client)

rulesClient, err := rules.NewRulesClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building Rules client: %+v", err)
}
configureFunc(rulesClient.Client)

trafficFilterClient, err := trafficfilter.NewTrafficFilterClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building TrafficFilter client: %+v", err)
}
configureFunc(trafficFilterClient.Client)

userOrganizationClient, err := userorganization.NewUserOrganizationClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building UserOrganization client: %+v", err)
}
configureFunc(userOrganizationClient.Client)

vMCollectionUpdateClient, err := vmcollectionupdate.NewVMCollectionUpdateClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building VMCollectionUpdate client: %+v", err)
}
configureFunc(vMCollectionUpdateClient.Client)

vMHHostListClient, err := vmhhostlist.NewVMHHostListClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building VMHHostList client: %+v", err)
}
configureFunc(vMHHostListClient.Client)

vMIngestionDetailsClient, err := vmingestiondetails.NewVMIngestionDetailsClientWithBaseURI(sdkApi)
if err != nil {
return nil, fmt.Errorf("building VMIngestionDetails client: %+v", err)
}
configureFunc(vMIngestionDetailsClient.Client)

return &Client{
ApiKey: apiKeyClient,
ConnectedResources: connectedResourcesClient,
DeploymentInfo: deploymentInfoClient,
DeploymentUpdate: deploymentUpdateClient,
ElasticVersions: elasticVersionsClient,
MonitorUpgradableVersions: monitorUpgradableVersionsClient,
MonitoredResources: monitoredResourcesClient,
MonitorsResource: monitorsResourceClient,
OpenAIIntegration: openAIIntegrationClient,
Rules: rulesClient,
TrafficFilter: trafficFilterClient,
UserOrganization: userOrganizationClient,
VMCollectionUpdate: vMCollectionUpdateClient,
VMHHostList: vMHHostListClient,
VMIngestionDetails: vMIngestionDetailsClient,
}, nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/connectedresources` Documentation

The `connectedresources` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`).

This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs).

### Import Path

```go
import "github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/connectedresources"
```


### Client Initialization

```go
client := connectedresources.NewConnectedResourcesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
```


### Example Usage: `ConnectedResourcesClient.BillingInfoGet`

```go
ctx := context.TODO()
id := connectedresources.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

read, err := client.BillingInfoGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `ConnectedResourcesClient.ConnectedPartnerResourcesList`

```go
ctx := context.TODO()
id := connectedresources.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

// alternatively `client.ConnectedPartnerResourcesList(ctx, id)` can be used to do batched pagination
items, err := client.ConnectedPartnerResourcesListComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
```
Loading
Loading