Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package organizations

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

type LiftrBaseMarketplaceDetailsUpdate struct {
OfferDetails *LiftrBaseOfferDetailsUpdate `json:"offerDetails,omitempty"`
SubscriptionId *string `json:"subscriptionId,omitempty"`
SubscriptionStatus *MarketplaceSubscriptionStatus `json:"subscriptionStatus,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package organizations

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

type LiftrBaseOfferDetailsUpdate struct {
OfferId *string `json:"offerId,omitempty"`
PlanId *string `json:"planId,omitempty"`
PlanName *string `json:"planName,omitempty"`
PublisherId *string `json:"publisherId,omitempty"`
TermId *string `json:"termId,omitempty"`
TermUnit *string `json:"termUnit,omitempty"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package organizations
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type OrganizationResourceUpdateProperties struct {
Marketplace *LiftrBaseMarketplaceDetailsUpdate `json:"marketplace,omitempty"`
PartnerOrganizationProperties *LiftrBaseDataPartnerOrganizationPropertiesUpdate `json:"partnerOrganizationProperties,omitempty"`
User *LiftrBaseUserDetailsUpdate `json:"user,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package organizations

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

type LiftrBaseMarketplaceDetailsUpdate struct {
OfferDetails *LiftrBaseOfferDetailsUpdate `json:"offerDetails,omitempty"`
SubscriptionId *string `json:"subscriptionId,omitempty"`
SubscriptionStatus *MarketplaceSubscriptionStatus `json:"subscriptionStatus,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package organizations

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

type LiftrBaseOfferDetailsUpdate struct {
OfferId *string `json:"offerId,omitempty"`
PlanId *string `json:"planId,omitempty"`
PlanName *string `json:"planName,omitempty"`
PublisherId *string `json:"publisherId,omitempty"`
RenewalMode *RenewalMode `json:"renewalMode,omitempty"`
TermId *string `json:"termId,omitempty"`
TermUnit *string `json:"termUnit,omitempty"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package organizations
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type OrganizationResourceUpdateProperties struct {
Marketplace *LiftrBaseMarketplaceDetailsUpdate `json:"marketplace,omitempty"`
PartnerOrganizationProperties *LiftrBaseDataPartnerOrganizationPropertiesUpdate `json:"partnerOrganizationProperties,omitempty"`
User *LiftrBaseUserDetailsUpdate `json:"user,omitempty"`
}
28 changes: 28 additions & 0 deletions resource-manager/azurefleet/2024-11-01/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package v2024_11_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/azurefleet/2024-11-01/fleets"
"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments"
)

type Client struct {
Fleets *fleets.FleetsClient
}

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

return &Client{
Fleets: fleetsClient,
}, nil
}
134 changes: 134 additions & 0 deletions resource-manager/azurefleet/2024-11-01/fleets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@

## `github.com/hashicorp/go-azure-sdk/resource-manager/azurefleet/2024-11-01/fleets` Documentation

The `fleets` SDK allows for interaction with Azure Resource Manager `azurefleet` (API Version `2024-11-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/azurefleet/2024-11-01/fleets"
```


### Client Initialization

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


### Example Usage: `FleetsClient.CreateOrUpdate`

```go
ctx := context.TODO()
id := fleets.NewFleetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName")

payload := fleets.Fleet{
// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
```


### Example Usage: `FleetsClient.Delete`

```go
ctx := context.TODO()
id := fleets.NewFleetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName")

if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
```


### Example Usage: `FleetsClient.Get`

```go
ctx := context.TODO()
id := fleets.NewFleetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName")

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


### Example Usage: `FleetsClient.ListByResourceGroup`

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

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


### Example Usage: `FleetsClient.ListBySubscription`

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

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


### Example Usage: `FleetsClient.ListVirtualMachineScaleSets`

```go
ctx := context.TODO()
id := fleets.NewFleetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName")

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


### Example Usage: `FleetsClient.Update`

```go
ctx := context.TODO()
id := fleets.NewFleetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "fleetName")

payload := fleets.FleetUpdate{
// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
```
26 changes: 26 additions & 0 deletions resource-manager/azurefleet/2024-11-01/fleets/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package fleets

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 FleetsClient struct {
Client *resourcemanager.Client
}

func NewFleetsClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetsClient, error) {
client, err := resourcemanager.NewClient(sdkApi, "fleets", defaultApiVersion)
if err != nil {
return nil, fmt.Errorf("instantiating FleetsClient: %+v", err)
}

return &FleetsClient{
Client: client,
}, nil
}
Loading
Loading