Skip to content

Commit b2cddab

Browse files
authored
[Release] sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/0.1.0 (#20437)
* [Release] sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/0.1.0 generation from spec commit: 85fb4ac6f8bfefd179e6c2632976a154b5c9ff04 * client factory * fix * fix * update
1 parent ed7f3c7 commit b2cddab

Some content is hidden

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

42 files changed

+20618
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release History
2+
3+
## 0.1.0 (2023-04-28)
4+
5+
The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html).
6+
7+
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: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Azure PaloAltoNetworks Module for Go
2+
3+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw)
4+
5+
The `armpanngfw` module provides operations for working with Azure PaloAltoNetworks.
6+
7+
[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw)
8+
9+
# Getting started
10+
11+
## Prerequisites
12+
13+
- an [Azure subscription](https://azure.microsoft.com/free/)
14+
- 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).)
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 PaloAltoNetworks module:
21+
22+
```sh
23+
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw
24+
```
25+
26+
## Authorization
27+
28+
When creating a client, you will need to provide a credential for authenticating with Azure PaloAltoNetworks. 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+
## Client Factory
37+
38+
Azure PaloAltoNetworks 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 := armpanngfw.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 := armpanngfw.NewClientFactory(<subscription ID>, cred, &options)
53+
```
54+
55+
## Clients
56+
57+
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.
58+
59+
```go
60+
client := clientFactory.NewLocalRulesClient()
61+
```
62+
63+
## Provide Feedback
64+
65+
If you encounter bugs or have suggestions, please
66+
[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `PaloAltoNetworks` label.
67+
68+
# Contributing
69+
70+
This project welcomes contributions and suggestions. Most contributions require
71+
you to agree to a Contributor License Agreement (CLA) declaring that you have
72+
the right to, and actually do, grant us the rights to use your contribution.
73+
For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
74+
75+
When you submit a pull request, a CLA-bot will automatically determine whether
76+
you need to provide a CLA and decorate the PR appropriately (e.g., label,
77+
comment). Simply follow the instructions provided by the bot. You will only
78+
need to do this once across all repos using our CLA.
79+
80+
This project has adopted the
81+
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
82+
For more information, see the
83+
[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
84+
or contact [[email protected]](mailto:[email protected]) with any
85+
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+
- https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/readme.md
9+
- https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/readme.go.md
10+
license-header: MICROSOFT_MIT_NO_VERSION
11+
module-version: 0.1.0
12+
13+
```
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
4+
// This file enables 'go generate' to regenerate this specific SDK
5+
//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -alwaysSetBodyParamRequired -removeUnreferencedTypes resourcemanager/paloaltonetworksngfw/armpanngfw
6+
7+
package armpanngfw

0 commit comments

Comments
 (0)