Skip to content

Commit 000a5b2

Browse files
author
SDKAuto
committed
CodeGen from PR 3486 in test-repo-billy/azure-rest-api-specs
Merge d89b28f77b3a51daf78eec3de0629005f3ed8329 into c221294c903b4bcbe7b1ee4bce901322a7056943
1 parent fdfd924 commit 000a5b2

File tree

161 files changed

+17721
-4572
lines changed

Some content is hidden

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

161 files changed

+17721
-4572
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Release History
2+
3+
## 1.0.0 (2024-08-22)
4+
### Other Changes
5+
6+
The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/communitytraining/armcommunitytraining` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html).
7+
8+
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: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Azure Communitytraining Module for Go
2+
3+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/communitytraining/armcommunitytraining)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/communitytraining/armcommunitytraining)
4+
5+
The `armcommunitytraining` module provides operations for working with Azure Communitytraining.
6+
7+
[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/communitytraining/armcommunitytraining)
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 Communitytraining module:
21+
22+
```sh
23+
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/communitytraining/armcommunitytraining
24+
```
25+
26+
## Authorization
27+
28+
When creating a client, you will need to provide a credential for authenticating with Azure Communitytraining. 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 Communitytraining 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 := armcommunitytraining.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 := armcommunitytraining.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.NewCommunityTrainingsClient()
61+
```
62+
63+
## Fakes
64+
65+
The fake package contains types used for constructing in-memory fake servers used in unit tests.
66+
This allows writing tests to cover various success/error conditions without the need for connecting to a live service.
67+
68+
Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.
69+
70+
## Provide Feedback
71+
72+
If you encounter bugs or have suggestions, please
73+
[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Communitytraining` label.
74+
75+
# Contributing
76+
77+
This project welcomes contributions and suggestions. Most contributions require
78+
you to agree to a Contributor License Agreement (CLA) declaring that you have
79+
the right to, and actually do, grant us the rights to use your contribution.
80+
For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
81+
82+
When you submit a pull request, a CLA-bot will automatically determine whether
83+
you need to provide a CLA and decorate the PR appropriately (e.g., label,
84+
comment). Simply follow the instructions provided by the bot. You will only
85+
need to do this once across all repos using our CLA.
86+
87+
This project has adopted the
88+
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
89+
For more information, see the
90+
[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
91+
or contact [[email protected]](mailto:[email protected]) with any
92+
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/communitytraining/resource-manager/readme.md
9+
- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/communitytraining/resource-manager/readme.go.md
10+
license-header: MICROSOFT_MIT_NO_VERSION
11+
module-version: 1.0.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/communitytraining/armcommunitytraining
6+
7+
package armcommunitytraining
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
2+
trigger:
3+
branches:
4+
include:
5+
- main
6+
- feature/*
7+
- hotfix/*
8+
- release/*
9+
paths:
10+
include:
11+
- sdk/resourcemanager/communitytraining/armcommunitytraining/
12+
13+
pr:
14+
branches:
15+
include:
16+
- main
17+
- feature/*
18+
- hotfix/*
19+
- release/*
20+
paths:
21+
include:
22+
- sdk/resourcemanager/communitytraining/armcommunitytraining/
23+
24+
extends:
25+
template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
26+
parameters:
27+
IncludeRelease: true
28+
ServiceDirectory: 'resourcemanager/communitytraining/armcommunitytraining'

sdk/resourcemanager/communitytraining/armcommunitytraining/client_factory.go

Lines changed: 52 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)