-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #883 from hashicorp/auto-pr/2498f5c1
Auto PR: Regenerating the Go SDK (6c37908)
- Loading branch information
Showing
170 changed files
with
11,103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
57 changes: 57 additions & 0 deletions
57
resource-manager/elastic/2024-03-01/apikey/method_organizationsgetapikey.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
8 changes: 8 additions & 0 deletions
8
resource-manager/elastic/2024-03-01/apikey/model_userapikeyresponse.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"` | ||
} |
8 changes: 8 additions & 0 deletions
8
resource-manager/elastic/2024-03-01/apikey/model_userapikeyresponseproperties.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"` | ||
} |
8 changes: 8 additions & 0 deletions
8
resource-manager/elastic/2024-03-01/apikey/model_useremailid.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
53 changes: 53 additions & 0 deletions
53
resource-manager/elastic/2024-03-01/connectedresources/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
``` |
Oops, something went wrong.