Skip to content

Commit 6ff892a

Browse files
author
SDKAuto
committed
CodeGen from PR 19729 in Azure/azure-rest-api-specs
Merge bfbfcad3e1f0083c920061f504f352b326d342b6 into 49e2859d9eef95013f083af9506127cfffd1e866
1 parent a83cc8c commit 6ff892a

18 files changed

+2603
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Release History
2+
3+
## 0.1.0 (2022-07-13)
4+
5+
The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 0.1.0, which contains breaking changes.
6+
7+
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration).
8+
9+
To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Azure Networkfunction Module for Go
2+
3+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction)
4+
5+
The `armnetworkfunction` module provides operations for working with Azure Networkfunction.
6+
7+
[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/networkfunction/armnetworkfunction)
8+
9+
# Getting started
10+
11+
## Prerequisites
12+
13+
- an [Azure subscription](https://azure.microsoft.com/free/)
14+
- Go 1.18 or above
15+
16+
## Install the package
17+
18+
This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management.
19+
20+
Install the Azure Networkfunction module:
21+
22+
```sh
23+
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction
24+
```
25+
26+
## Authorization
27+
28+
When creating a client, you will need to provide a credential for authenticating with Azure Networkfunction. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.
29+
30+
```go
31+
cred, err := azidentity.NewDefaultAzureCredential(nil)
32+
```
33+
34+
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).
35+
36+
## Clients
37+
38+
Azure Networkfunction 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.
39+
40+
```go
41+
client, err := armnetworkfunction.NewAzureTrafficCollectorsClient(<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+
client, err := armnetworkfunction.NewAzureTrafficCollectorsClient(<subscription ID>, cred, &options)
53+
```
54+
55+
## Provide Feedback
56+
57+
If you encounter bugs or have suggestions, please
58+
[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Networkfunction` label.
59+
60+
# Contributing
61+
62+
This project welcomes contributions and suggestions. Most contributions require
63+
you to agree to a Contributor License Agreement (CLA) declaring that you have
64+
the right to, and actually do, grant us the rights to use your contribution.
65+
For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
66+
67+
When you submit a pull request, a CLA-bot will automatically determine whether
68+
you need to provide a CLA and decorate the PR appropriately (e.g., label,
69+
comment). Simply follow the instructions provided by the bot. You will only
70+
need to do this once across all repos using our CLA.
71+
72+
This project has adopted the
73+
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
74+
For more information, see the
75+
[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
76+
or contact [[email protected]](mailto:[email protected]) with any
77+
additional questions or comments.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### AutoRest Configuration
2+
3+
> see https://aka.ms/autorest
4+
5+
``` yaml
6+
azure-arm: true
7+
require:
8+
- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/networkfunction/resource-manager/readme.md
9+
- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/networkfunction/resource-manager/readme.go.md
10+
license-header: MICROSOFT_MIT_NO_VERSION
11+
module-version: 0.1.0
12+
13+
```

0 commit comments

Comments
 (0)