Skip to content

Commit ced51d5

Browse files
authored
Release refresh all package 1679885067 (Azure#20471)
* [Release] sdk/resourcemanager/compute/armcompute/4.2.0 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armchanges/1.0.1 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armdeploymentscripts/2.0.0 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armfeatures/1.0.1 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armlinks/1.0.1 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armlocks/1.0.1 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armmanagedapplications/1.0.1 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armpolicy/0.7.0 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armresources/2.0.0 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armsubscriptions/2.0.0 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/resources/armtemplatespecs/1.0.1 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/storage/armstorage/1.2.1 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/keyvault/armkeyvault/1.1.0-beta.2 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/authorization/armauthorization/3.0.0 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * [Release] sdk/resourcemanager/containerregistry/armcontainerregistry/1.1.0-beta.1 generation from spec commit: 2ac8dec9cbc4ad4db7537de603339f069d482078 * update changelog and readme * fix version * fix authorization * containerregistry recording * armresources recording
1 parent f79a2bd commit ced51d5

File tree

458 files changed

+81342
-20168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+81342
-20168
lines changed

sdk/resourcemanager/authorization/armauthorization/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 2.1.0 (2023-03-27)
4+
### Features Added
5+
6+
- New struct `ClientFactory` which is a client factory used to create any client in this module
7+
8+
39
## 2.0.0 (2022-09-26)
410
### Breaking Changes
511

sdk/resourcemanager/authorization/armauthorization/README.md

Lines changed: 90 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,109 @@ cred, err := azidentity.NewDefaultAzureCredential(nil)
3333

3434
For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity).
3535

36+
## Client Factory
37+
38+
Azure Authorization module consists of one or more clients. We provide a client factory which could be used to create any client in this module.
39+
40+
```go
41+
clientFactory, err := armauthorization.NewClientFactory(<subscription ID>, cred, nil)
42+
```
43+
44+
You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore).
45+
46+
```go
47+
options := arm.ClientOptions {
48+
ClientOptions: azcore.ClientOptions {
49+
Cloud: cloud.AzureChina,
50+
},
51+
}
52+
clientFactory, err := armauthorization.NewClientFactory(<subscription ID>, cred, &options)
53+
```
54+
55+
## Client Factory
56+
57+
Azure XXX module consists of one or more clients. We provide a client factory which could be used to create any client in this module.
58+
59+
```go
60+
clientFactory, err := armX.NewClientFactory(<subscription ID>, cred, nil)
61+
```
62+
63+
You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore).
64+
65+
```go
66+
options := arm.ClientOptions {
67+
ClientOptions: azcore.ClientOptions {
68+
Cloud: cloud.AzureChina,
69+
},
70+
}
71+
clientFactory, err := armX.NewClientFactory(<subscription ID>, cred, &options)
72+
```
73+
3674
## Clients
3775

38-
Azure Authorization modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.
76+
A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.
3977

4078
```go
41-
client, err := armauthorization.NewAccessReviewInstancesClient(<subscription ID>, cred, nil)
79+
client := clientFactory.NewXClient()
80+
81+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization)
82+
83+
The `armauthorization` module provides operations for working with Azure Authorization.
84+
85+
[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/authorization/armauthorization)
86+
87+
# Getting started
88+
89+
## Prerequisites
90+
91+
- an [Azure subscription](https://azure.microsoft.com/free/)
92+
- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).)
93+
94+
## Install the package
95+
96+
This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management.
97+
98+
Install the Azure Authorization module:
99+
100+
```sh
101+
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization
102+
```
103+
104+
## Authorization
105+
106+
When creating a client, you will need to provide a credential for authenticating with Azure Authorization. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.
107+
108+
```go
109+
cred, err := azidentity.NewDefaultAzureCredential(nil)
110+
```
111+
112+
For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity).
113+
114+
## Client Factory
115+
116+
Azure Authorization module consists of one or more clients. We provide a client factory which could be used to create any client in this module.
117+
118+
```go
119+
clientFactory, err := armauthorization.NewClientFactory(<subscription ID>, cred, nil)
42120
```
43121

44122
You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore).
45123

46124
```go
47125
options := arm.ClientOptions {
48-
ClientOptions: azcore.ClientOptions {
126+
ClientOptions: azcore.ClientOptions {
49127
Cloud: cloud.AzureChina,
50128
},
51129
}
52-
client, err := armauthorization.NewAccessReviewInstancesClient(<subscription ID>, cred, &options)
130+
clientFactory, err := armauthorization.NewClientFactory(<subscription ID>, cred, &options)
131+
```
132+
133+
## Clients
134+
135+
A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.
136+
137+
```go
138+
client := clientFactory.NewPermissionsClient()
53139
```
54140

55141
## Provide Feedback

sdk/resourcemanager/authorization/armauthorization/autorest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ require:
88
- https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/specification/authorization/resource-manager/readme.md
99
- https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/specification/authorization/resource-manager/readme.go.md
1010
license-header: MICROSOFT_MIT_NO_VERSION
11-
module-version: 2.0.0
11+
module-version: 2.1.0
1212
tag: package-2022-04-01
1313
```

sdk/resourcemanager/authorization/armauthorization/classicadministrators_client.go

Lines changed: 11 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/resourcemanager/authorization/armauthorization/classicadministrators_client_example_test.go

Lines changed: 29 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/resourcemanager/authorization/armauthorization/client_factory.go

Lines changed: 119 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)