-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
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/cdn/mgmt/2017-10-12/cdn"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
)
type Client struct {
CustomDomainsClient *cdn.CustomDomainsClient
EndpointsClient *cdn.EndpointsClient
ProfilesClient *cdn.ProfilesClient
}
func NewClient(o *common.ClientOptions) *Client {
customDomainsClient := cdn.NewCustomDomainsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&customDomainsClient.Client, o.ResourceManagerAuthorizer)
endpointsClient := cdn.NewEndpointsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&endpointsClient.Client, o.ResourceManagerAuthorizer)
profilesClient := cdn.NewProfilesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&profilesClient.Client, o.ResourceManagerAuthorizer)
return &Client{
CustomDomainsClient: &customDomainsClient,
EndpointsClient: &endpointsClient,
ProfilesClient: &profilesClient,
}
}