forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.go
29 lines (23 loc) · 1.04 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package client
import (
"github.com/Azure/azure-sdk-for-go/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
)
type Client struct {
BlueprintClient *blueprint.BlueprintsClient
AssignmentClient *blueprint.AssignmentsClient
PublishClient *blueprint.PublishedBlueprintsClient
}
func NewClient(o *common.ClientOptions) *Client {
blueprintsClient := blueprint.NewBlueprintsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&blueprintsClient.Client, o.ResourceManagerAuthorizer)
assignmentsClient := blueprint.NewAssignmentsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&assignmentsClient.Client, o.ResourceManagerAuthorizer)
publishClient := blueprint.NewPublishedBlueprintsClientWithBaseURI(o.ResourceManagerEndpoint)
o.ConfigureClient(&publishClient.Client, o.ResourceManagerAuthorizer)
return &Client{
BlueprintClient: &blueprintsClient,
AssignmentClient: &assignmentsClient,
PublishClient: &publishClient,
}
}