build(deps): bump the go-deps group with 10 updates
Bumps the go-deps group with 10 updates: | Package | From | To | | --- | --- | --- | | [cloud.google.com/go/compute](https://github.com/googleapis/google-cloud-go) | `1.23.3` | `1.23.4` | | [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) | `1.36.0` | `1.37.0` | | [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) | `1.4.0` | `1.5.1` | | [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5](https://github.com/Azure/azure-sdk-for-go) | `5.3.0` | `5.5.0` | | [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.50.0` | `1.50.8` | | [github.com/google/uuid](https://github.com/google/uuid) | `1.5.0` | `1.6.0` | | [github.com/jackc/pgtype](https://github.com/jackc/pgtype) | `1.14.0` | `1.14.1` | | [github.com/openshift-online/ocm-sdk-go](https://github.com/openshift-online/ocm-sdk-go) | `0.1.390` | `0.1.398` | | [github.com/osbuild/images](https://github.com/osbuild/images) | `0.33.0` | `0.34.0` | | [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.160.0` | `0.161.0` | Updates `cloud.google.com/go/compute` from 1.23.3 to 1.23.4 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/compute/v1.23.3...compute/v1.23.4) Updates `cloud.google.com/go/storage` from 1.36.0 to 1.37.0 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.36.0...spanner/v1.37.0) Updates `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.4.0 to 1.5.1 - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.4.0...sdk/internal/v1.5.1) Updates `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5` from 5.3.0 to 5.5.0 - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/resourcemanager/compute/armcompute/v5.3.0...sdk/resourcemanager/compute/armcompute/v5.5.0) Updates `github.com/aws/aws-sdk-go` from 1.50.0 to 1.50.8 - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.50.0...v1.50.8) Updates `github.com/google/uuid` from 1.5.0 to 1.6.0 - [Release notes](https://github.com/google/uuid/releases) - [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/uuid/compare/v1.5.0...v1.6.0) Updates `github.com/jackc/pgtype` from 1.14.0 to 1.14.1 - [Changelog](https://github.com/jackc/pgtype/blob/master/CHANGELOG.md) - [Commits](https://github.com/jackc/pgtype/compare/v1.14.0...v1.14.1) Updates `github.com/openshift-online/ocm-sdk-go` from 0.1.390 to 0.1.398 - [Release notes](https://github.com/openshift-online/ocm-sdk-go/releases) - [Changelog](https://github.com/openshift-online/ocm-sdk-go/blob/main/CHANGES.md) - [Commits](https://github.com/openshift-online/ocm-sdk-go/compare/v0.1.390...v0.1.398) Updates `github.com/osbuild/images` from 0.33.0 to 0.34.0 - [Release notes](https://github.com/osbuild/images/releases) - [Commits](https://github.com/osbuild/images/compare/v0.33.0...v0.34.0) Updates `google.golang.org/api` from 0.160.0 to 0.161.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.160.0...v0.161.0) --- updated-dependencies: - dependency-name: cloud.google.com/go/compute dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: cloud.google.com/go/storage dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/google/uuid dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/jackc/pgtype dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/openshift-online/ocm-sdk-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-deps - dependency-name: github.com/osbuild/images dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
db0e6c9643
commit
b461b1faf3
306 changed files with 80393 additions and 56486 deletions
39
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
generated
vendored
39
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
generated
vendored
|
|
@ -1,5 +1,38 @@
|
|||
# Release History
|
||||
|
||||
## 1.5.1 (2024-01-17)
|
||||
|
||||
### Bugs Fixed
|
||||
* `InteractiveBrowserCredential` handles `AdditionallyAllowedTenants` correctly
|
||||
|
||||
## 1.5.0 (2024-01-16)
|
||||
|
||||
### Breaking Changes
|
||||
> These changes affect only code written against a beta version such as v1.5.0-beta.1
|
||||
* Removed persistent token caching. It will return in v1.6.0-beta.1
|
||||
|
||||
### Bugs Fixed
|
||||
* Credentials now preserve MSAL headers e.g. X-Client-Sku
|
||||
|
||||
### Other Changes
|
||||
* Upgraded dependencies
|
||||
|
||||
## 1.5.0-beta.2 (2023-11-07)
|
||||
|
||||
### Features Added
|
||||
* `DefaultAzureCredential` and `ManagedIdentityCredential` support Azure ML managed identity
|
||||
* Added spans for distributed tracing.
|
||||
|
||||
## 1.5.0-beta.1 (2023-10-10)
|
||||
|
||||
### Features Added
|
||||
* Optional persistent token caching for most credentials. Set `TokenCachePersistenceOptions`
|
||||
on a credential's options to enable and configure this. See the package documentation for
|
||||
this version and [TOKEN_CACHING.md](https://aka.ms/azsdk/go/identity/caching) for more
|
||||
details.
|
||||
* `AzureDeveloperCLICredential` authenticates with the Azure Developer CLI (`azd`). This
|
||||
credential is also part of the `DefaultAzureCredential` authentication flow.
|
||||
|
||||
## 1.4.0 (2023-10-10)
|
||||
|
||||
### Bugs Fixed
|
||||
|
|
@ -94,14 +127,14 @@
|
|||
### Features Added
|
||||
* By default, credentials set client capability "CP1" to enable support for
|
||||
[Continuous Access Evaluation (CAE)](https://docs.microsoft.com/azure/active-directory/develop/app-resilience-continuous-access-evaluation).
|
||||
This indicates to Azure Active Directory that your application can handle CAE claims challenges.
|
||||
This indicates to Microsoft Entra ID that your application can handle CAE claims challenges.
|
||||
You can disable this behavior by setting the environment variable "AZURE_IDENTITY_DISABLE_CP1" to "true".
|
||||
* `InteractiveBrowserCredentialOptions.LoginHint` enables pre-populating the login
|
||||
prompt with a username ([#15599](https://github.com/Azure/azure-sdk-for-go/pull/15599))
|
||||
* Service principal and user credentials support ADFS authentication on Azure Stack.
|
||||
Specify "adfs" as the credential's tenant.
|
||||
* Applications running in private or disconnected clouds can prevent credentials from
|
||||
requesting Azure AD instance metadata by setting the `DisableInstanceDiscovery`
|
||||
requesting Microsoft Entra instance metadata by setting the `DisableInstanceDiscovery`
|
||||
field on credential options.
|
||||
* Many credentials can now be configured to authenticate in multiple tenants. The
|
||||
options types for these credentials have an `AdditionallyAllowedTenants` field
|
||||
|
|
@ -454,4 +487,4 @@
|
|||
|
||||
## 0.1.0 (2020-07-23)
|
||||
### Features Added
|
||||
* Initial Release. Azure Identity library that provides Azure Active Directory token authentication support for the SDK.
|
||||
* Initial Release. Azure Identity library that provides Microsoft Entra token authentication support for the SDK.
|
||||
|
|
|
|||
6
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/MIGRATION.md
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/MIGRATION.md
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
# Migrating from autorest/adal to azidentity
|
||||
|
||||
`azidentity` provides Azure Active Directory (Azure AD) authentication for the newest Azure SDK modules (`github.com/azure-sdk-for-go/sdk/...`). Older Azure SDK packages (`github.com/azure-sdk-for-go/services/...`) use types from `github.com/go-autorest/autorest/adal` instead.
|
||||
`azidentity` provides Microsoft Entra ID ([formerly Azure Active Directory](https://learn.microsoft.com/azure/active-directory/fundamentals/new-name)) authentication for the newest Azure SDK modules (`github.com/azure-sdk-for-go/sdk/...`). Older Azure SDK packages (`github.com/azure-sdk-for-go/services/...`) use types from `github.com/go-autorest/autorest/adal` instead.
|
||||
|
||||
This guide shows common authentication code using `autorest/adal` and its equivalent using `azidentity`.
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ This guide shows common authentication code using `autorest/adal` and its equiva
|
|||
|
||||
### `autorest/adal`
|
||||
|
||||
Token providers require a token audience (resource identifier) and an instance of `adal.OAuthConfig`, which requires an Azure AD endpoint and tenant:
|
||||
Token providers require a token audience (resource identifier) and an instance of `adal.OAuthConfig`, which requires a Microsoft Entra endpoint and tenant:
|
||||
|
||||
```go
|
||||
import "github.com/Azure/go-autorest/autorest/adal"
|
||||
|
|
@ -284,7 +284,7 @@ if err == nil {
|
|||
}
|
||||
```
|
||||
|
||||
Note that `azidentity` credentials use the Azure AD v2.0 endpoint, which requires OAuth 2 scopes instead of the resource identifiers `autorest/adal` expects. For more information, see [Azure AD documentation](https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent).
|
||||
Note that `azidentity` credentials use the Microsoft Entra endpoint, which requires OAuth 2 scopes instead of the resource identifiers `autorest/adal` expects. For more information, see [Microsoft Entra ID documentation](https://learn.microsoft.com/azure/active-directory/develop/permissions-consent-overview).
|
||||
|
||||
## Use azidentity credentials with older packages
|
||||
|
||||
|
|
|
|||
40
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
generated
vendored
40
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
generated
vendored
|
|
@ -1,9 +1,9 @@
|
|||
# Azure Identity Client Module for Go
|
||||
|
||||
The Azure Identity module provides Azure Active Directory (Azure AD) token authentication support across the Azure SDK. It includes a set of `TokenCredential` implementations, which can be used with Azure SDK clients supporting token authentication.
|
||||
The Azure Identity module provides Microsoft Entra ID ([formerly Azure Active Directory](https://learn.microsoft.com/azure/active-directory/fundamentals/new-name)) token authentication support across the Azure SDK. It includes a set of `TokenCredential` implementations, which can be used with Azure SDK clients supporting token authentication.
|
||||
|
||||
[](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity)
|
||||
| [Azure Active Directory documentation](https://docs.microsoft.com/azure/active-directory/)
|
||||
| [Microsoft Entra ID documentation](https://learn.microsoft.com/azure/active-directory/)
|
||||
| [Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/azidentity)
|
||||
|
||||
# Getting started
|
||||
|
|
@ -35,6 +35,12 @@ signed in to the [Azure CLI](https://docs.microsoft.com/cli/azure). To sign in t
|
|||
When no default browser is available, `az login` will use the device code
|
||||
authentication flow. This can also be selected manually by running `az login --use-device-code`.
|
||||
|
||||
#### Authenticate via the Azure Developer CLI
|
||||
|
||||
Developers coding outside of an IDE can also use the [Azure Developer CLI](https://aka.ms/azure-dev) to authenticate. Applications using the `DefaultAzureCredential` or the `AzureDeveloperCLICredential` can use the account logged in to the Azure Developer CLI to authenticate calls in their application when running locally.
|
||||
|
||||
To authenticate with the Azure Developer CLI, run `azd auth login`. On a system with a default web browser, `azd` will launch the browser to authenticate. On systems without a default web browser, run `azd auth login --use-device-code` to use the device code authentication flow.
|
||||
|
||||
## Key concepts
|
||||
|
||||
### Credentials
|
||||
|
|
@ -44,9 +50,7 @@ service client to authenticate requests. Service clients across the Azure SDK
|
|||
accept a credential instance when they are constructed, and use that credential
|
||||
to authenticate requests.
|
||||
|
||||
The `azidentity` module focuses on OAuth authentication with Azure Active
|
||||
Directory (AAD). It offers a variety of credential types capable of acquiring
|
||||
an Azure AD access token. See [Credential Types](#credential-types "Credential Types") for a list of this module's credential types.
|
||||
The `azidentity` module focuses on OAuth authentication with Microsoft Entra ID. It offers a variety of credential types capable of acquiring a Microsoft Entra access token. See [Credential Types](#credential-types "Credential Types") for a list of this module's credential types.
|
||||
|
||||
### DefaultAzureCredential
|
||||
|
||||
|
|
@ -58,6 +62,7 @@ an Azure AD access token. See [Credential Types](#credential-types "Credential T
|
|||
1. **Workload Identity** - If the app is deployed on Kubernetes with environment variables set by the workload identity webhook, `DefaultAzureCredential` will authenticate the configured identity.
|
||||
1. **Managed Identity** - If the app is deployed to an Azure host with managed identity enabled, `DefaultAzureCredential` will authenticate with it.
|
||||
1. **Azure CLI** - If a user or service principal has authenticated via the Azure CLI `az login` command, `DefaultAzureCredential` will authenticate that identity.
|
||||
1. **Azure Developer CLI** - If the developer has authenticated via the Azure Developer CLI `azd auth login` command, the `DefaultAzureCredential` will authenticate with that account.
|
||||
|
||||
> Note: `DefaultAzureCredential` is intended to simplify getting started with the SDK by handling common scenarios with reasonable default behaviors. Developers who want more control or whose scenario isn't served by the default settings should use other credential types.
|
||||
|
||||
|
|
@ -152,6 +157,7 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
|
|||
|Credential|Usage
|
||||
|-|-
|
||||
|[AzureCLICredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#AzureCLICredential)|Authenticate as the user signed in to the Azure CLI
|
||||
|[`AzureDeveloperCLICredential`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#AzureDeveloperCLICredential)|Authenticates as the user signed in to the Azure Developer CLI
|
||||
|
||||
## Environment Variables
|
||||
|
||||
|
|
@ -161,16 +167,16 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
|
|||
|
||||
|variable name|value
|
||||
|-|-
|
||||
|`AZURE_CLIENT_ID`|ID of an Azure Active Directory application
|
||||
|`AZURE_TENANT_ID`|ID of the application's Azure Active Directory tenant
|
||||
|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application
|
||||
|`AZURE_TENANT_ID`|ID of the application's Microsoft Entra tenant
|
||||
|`AZURE_CLIENT_SECRET`|one of the application's client secrets
|
||||
|
||||
#### Service principal with certificate
|
||||
|
||||
|variable name|value
|
||||
|-|-
|
||||
|`AZURE_CLIENT_ID`|ID of an Azure Active Directory application
|
||||
|`AZURE_TENANT_ID`|ID of the application's Azure Active Directory tenant
|
||||
|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application
|
||||
|`AZURE_TENANT_ID`|ID of the application's Microsoft Entra tenant
|
||||
|`AZURE_CLIENT_CERTIFICATE_PATH`|path to a certificate file including private key
|
||||
|`AZURE_CLIENT_CERTIFICATE_PASSWORD`|password of the certificate file, if any
|
||||
|
||||
|
|
@ -178,22 +184,30 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
|
|||
|
||||
|variable name|value
|
||||
|-|-
|
||||
|`AZURE_CLIENT_ID`|ID of an Azure Active Directory application
|
||||
|`AZURE_CLIENT_ID`|ID of a Microsoft Entra application
|
||||
|`AZURE_USERNAME`|a username (usually an email address)
|
||||
|`AZURE_PASSWORD`|that user's password
|
||||
|
||||
Configuration is attempted in the above order. For example, if values for a
|
||||
client secret and certificate are both present, the client secret will be used.
|
||||
|
||||
## Token caching
|
||||
|
||||
Token caching is an `azidentity` feature that allows apps to:
|
||||
|
||||
* Cache tokens in memory (default) or on disk (opt-in).
|
||||
* Improve resilience and performance.
|
||||
* Reduce the number of requests made to Microsoft Entra ID to obtain access tokens.
|
||||
|
||||
For more details, see the [token caching documentation](https://aka.ms/azsdk/go/identity/caching).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Error Handling
|
||||
|
||||
Credentials return an `error` when they fail to authenticate or lack data they require to authenticate. For guidance on resolving errors from specific credential types, see the [troubleshooting guide](https://aka.ms/azsdk/go/identity/troubleshoot).
|
||||
|
||||
For more details on handling specific Azure Active Directory errors please refer to the
|
||||
Azure Active Directory
|
||||
[error code documentation](https://docs.microsoft.com/azure/active-directory/develop/reference-aadsts-error-codes).
|
||||
For more details on handling specific Microsoft Entra errors, see the Microsoft Entra [error code documentation](https://learn.microsoft.com/azure/active-directory/develop/reference-error-codes).
|
||||
|
||||
### Logging
|
||||
|
||||
|
|
|
|||
70
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
generated
vendored
Normal file
70
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
generated
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
## Token caching in the Azure Identity client module
|
||||
|
||||
*Token caching* is a feature provided by the Azure Identity library that allows apps to:
|
||||
|
||||
- Improve their resilience and performance.
|
||||
- Reduce the number of requests made to Microsoft Entra ID to obtain access tokens.
|
||||
- Reduce the number of times the user is prompted to authenticate.
|
||||
|
||||
When an app needs to access a protected Azure resource, it typically needs to obtain an access token from Entra ID. Obtaining that token involves sending a request to Entra ID and may also involve prompting the user. Entra ID then validates the credentials provided in the request and issues an access token.
|
||||
|
||||
Token caching, via the Azure Identity library, allows the app to store this access token [in memory](#in-memory-token-caching), where it's accessible to the current process, or [on disk](#persistent-token-caching) where it can be accessed across application or process invocations. The token can then be retrieved quickly and easily the next time the app needs to access the same resource. The app can avoid making another request to Entra ID, which reduces network traffic and improves resilience. Additionally, in scenarios where the app is authenticating users, token caching also avoids prompting the user each time new tokens are requested.
|
||||
|
||||
### In-memory token caching
|
||||
|
||||
*In-memory token caching* is the default option provided by the Azure Identity library. This caching approach allows apps to store access tokens in memory. With in-memory token caching, the library first determines if a valid access token for the requested resource is already stored in memory. If a valid token is found, it's returned to the app without the need to make another request to Entra ID. If a valid token isn't found, the library will automatically acquire a token by sending a request to Entra ID. The in-memory token cache provided by the Azure Identity library is thread-safe.
|
||||
|
||||
**Note:** When Azure Identity library credentials are used with Azure service libraries (for example, Azure Blob Storage), the in-memory token caching is active in the `Pipeline` layer as well. All `TokenCredential` implementations are supported there, including custom implementations external to the Azure Identity library.
|
||||
|
||||
#### Caching cannot be disabled
|
||||
|
||||
As there are many levels of caching, it's not possible disable in-memory caching. However, the in-memory cache may be cleared by creating a new credential instance.
|
||||
|
||||
### Persistent token caching
|
||||
|
||||
> Only azidentity v1.5.0-beta versions support persistent token caching
|
||||
|
||||
*Persistent disk token caching* is an opt-in feature in the Azure Identity library. The feature allows apps to cache access tokens in an encrypted, persistent storage mechanism. As indicated in the following table, the storage mechanism differs across operating systems.
|
||||
|
||||
| Operating system | Storage mechanism |
|
||||
|------------------|---------------------------------------|
|
||||
| Linux | kernel key retention service (keyctl) |
|
||||
| macOS | Keychain |
|
||||
| Windows | DPAPI |
|
||||
|
||||
By default the token cache will protect any data which is persisted using the user data protection APIs available on the current platform.
|
||||
However, there are cases where no data protection is available, and applications may choose to allow storing the token cache in an unencrypted state by setting `TokenCachePersistenceOptions.AllowUnencryptedStorage` to `true`. This allows a credential to fall back to unencrypted storage if it can't encrypt the cache. However, we do not recommend using this storage method due to its significantly lower security measures. In addition, tokens are not encrypted solely to the current user, which could potentially allow unauthorized access to the cache by individuals with machine access.
|
||||
|
||||
With persistent disk token caching enabled, the library first determines if a valid access token for the requested resource is already stored in the persistent cache. If a valid token is found, it's returned to the app without the need to make another request to Entra ID. Additionally, the tokens are preserved across app runs, which:
|
||||
|
||||
- Makes the app more resilient to failures.
|
||||
- Ensures the app can continue to function during an Entra ID outage or disruption.
|
||||
- Avoids having to prompt users to authenticate each time the process is restarted.
|
||||
|
||||
>IMPORTANT! The token cache contains sensitive data and **MUST** be protected to prevent compromising accounts. All application decisions regarding the persistence of the token cache must consider that a breach of its content will fully compromise all the accounts it contains.
|
||||
|
||||
#### Example code
|
||||
|
||||
See the [package documentation](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity@v1.5.0-beta.1#pkg-overview) for code examples demonstrating how to configure persistent caching and access cached data.
|
||||
|
||||
### Credentials supporting token caching
|
||||
|
||||
The following table indicates the state of in-memory and persistent caching in each credential type.
|
||||
|
||||
**Note:** In-memory caching is activated by default. Persistent token caching needs to be enabled as shown in [this example](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity@v1.5.0-beta.1#example-package-PersistentCache).
|
||||
|
||||
| Credential | In-memory token caching | Persistent token caching |
|
||||
|--------------------------------|---------------------------------------------------------------------|--------------------------|
|
||||
| `AzureCLICredential` | Not Supported | Not Supported |
|
||||
| `AzureDeveloperCLICredential` | Not Supported | Not Supported |
|
||||
| `ClientAssertionCredential` | Supported | Supported |
|
||||
| `ClientCertificateCredential` | Supported | Supported |
|
||||
| `ClientSecretCredential` | Supported | Supported |
|
||||
| `DefaultAzureCredential` | Supported if the target credential in the default chain supports it | Not Supported |
|
||||
| `DeviceCodeCredential` | Supported | Supported |
|
||||
| `EnvironmentCredential` | Supported | Not Supported |
|
||||
| `InteractiveBrowserCredential` | Supported | Supported |
|
||||
| `ManagedIdentityCredential` | Supported | Not Supported |
|
||||
| `OnBehalfOfCredential` | Supported | Supported |
|
||||
| `UsernamePasswordCredential` | Supported | Supported |
|
||||
| `WorkloadIdentityCredential` | Supported | Supported |
|
||||
46
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
generated
vendored
46
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
generated
vendored
|
|
@ -8,7 +8,8 @@ This troubleshooting guide covers failure investigation techniques, common error
|
|||
- [Permission issues](#permission-issues)
|
||||
- [Find relevant information in errors](#find-relevant-information-in-errors)
|
||||
- [Enable and configure logging](#enable-and-configure-logging)
|
||||
- [Troubleshoot AzureCliCredential authentication issues](#troubleshoot-azureclicredential-authentication-issues)
|
||||
- [Troubleshoot AzureCLICredential authentication issues](#troubleshoot-azureclicredential-authentication-issues)
|
||||
- [Troubleshoot AzureDeveloperCLICredential authentication issues](#troubleshoot-azuredeveloperclicredential-authentication-issues)
|
||||
- [Troubleshoot ClientCertificateCredential authentication issues](#troubleshoot-clientcertificatecredential-authentication-issues)
|
||||
- [Troubleshoot ClientSecretCredential authentication issues](#troubleshoot-clientsecretcredential-authentication-issues)
|
||||
- [Troubleshoot DefaultAzureCredential authentication issues](#troubleshoot-defaultazurecredential-authentication-issues)
|
||||
|
|
@ -23,7 +24,7 @@ This troubleshooting guide covers failure investigation techniques, common error
|
|||
|
||||
## Handle azidentity errors
|
||||
|
||||
Any service client method that makes a request to the service may return an error due to authentication failure. This is because the credential authenticates on the first call to the service and on any subsequent call that needs to refresh an access token. Authentication errors include a description of the failure and possibly an error message from Azure Active Directory (Azure AD). Depending on the application, these errors may or may not be recoverable.
|
||||
Any service client method that makes a request to the service may return an error due to authentication failure. This is because the credential authenticates on the first call to the service and on any subsequent call that needs to refresh an access token. Authentication errors include a description of the failure and possibly an error message from Microsoft Entra ID. Depending on the application, these errors may or may not be recoverable.
|
||||
|
||||
### Permission issues
|
||||
|
||||
|
|
@ -31,7 +32,7 @@ Service client errors with a status code of 401 or 403 often indicate that authe
|
|||
|
||||
## Find relevant information in errors
|
||||
|
||||
Authentication errors can include responses from Azure AD and often contain information helpful in diagnosis. Consider the following error message:
|
||||
Authentication errors can include responses from Microsoft Entra ID and often contain information helpful in diagnosis. Consider the following error message:
|
||||
|
||||
```
|
||||
ClientSecretCredential authentication failed
|
||||
|
|
@ -57,9 +58,9 @@ This error contains several pieces of information:
|
|||
|
||||
- __Failing Credential Type__: The type of credential that failed to authenticate. This can be helpful when diagnosing issues with chained credential types such as `DefaultAzureCredential` or `ChainedTokenCredential`.
|
||||
|
||||
- __Azure AD Error Code and Message__: The error code and message returned by Azure AD. This can give insight into the specific reason the request failed. For instance, in this case authentication failed because the provided client secret is incorrect. [Azure AD documentation](https://docs.microsoft.com/azure/active-directory/develop/reference-aadsts-error-codes#aadsts-error-codes) has more information on AADSTS error codes.
|
||||
- __Microsoft Entra ID Error Code and Message__: The error code and message returned by Microsoft Entra ID. This can give insight into the specific reason the request failed. For instance, in this case authentication failed because the provided client secret is incorrect. [Microsoft Entra ID documentation](https://learn.microsoft.com/azure/active-directory/develop/reference-error-codes#aadsts-error-codes) has more information on AADSTS error codes.
|
||||
|
||||
- __Correlation ID and Timestamp__: The correlation ID and timestamp identify the request in server-side logs. This information can be useful to support engineers diagnosing unexpected Azure AD failures.
|
||||
- __Correlation ID and Timestamp__: The correlation ID and timestamp identify the request in server-side logs. This information can be useful to support engineers diagnosing unexpected Microsoft Entra failures.
|
||||
|
||||
### Enable and configure logging
|
||||
|
||||
|
|
@ -96,17 +97,17 @@ azlog.SetEvents(azidentity.EventAuthentication)
|
|||
|
||||
| Error Code | Issue | Mitigation |
|
||||
|---|---|---|
|
||||
|AADSTS7000215|An invalid client secret was provided.|Ensure the secret provided to the credential constructor is valid. If unsure, create a new client secret using the Azure portal. Details on creating a new client secret are in [Azure AD documentation](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret).|
|
||||
|AADSTS7000222|An expired client secret was provided.|Create a new client secret using the Azure portal. Details on creating a new client secret are in [Azure AD documentation](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret).|
|
||||
|AADSTS700016|The specified application wasn't found in the specified tenant.|Ensure the client and tenant IDs provided to the credential constructor are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the [Azure AD instructions](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).|
|
||||
|AADSTS7000215|An invalid client secret was provided.|Ensure the secret provided to the credential constructor is valid. If unsure, create a new client secret using the Azure portal. Details on creating a new client secret are in [Microsoft Entra ID documentation](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret).|
|
||||
|AADSTS7000222|An expired client secret was provided.|Create a new client secret using the Azure portal. Details on creating a new client secret are in [Microsoft Entra ID documentation](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret).|
|
||||
|AADSTS700016|The specified application wasn't found in the specified tenant.|Ensure the client and tenant IDs provided to the credential constructor are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the [Microsoft Entra ID instructions](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).|
|
||||
|
||||
<a id="client-cert"></a>
|
||||
## Troubleshoot ClientCertificateCredential authentication issues
|
||||
|
||||
| Error Code | Description | Mitigation |
|
||||
|---|---|---|
|
||||
|AADSTS700027|Client assertion contains an invalid signature.|Ensure the specified certificate has been uploaded to the application registration as described in [Azure AD documentation](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-1-upload-a-certificate).|
|
||||
|AADSTS700016|The specified application wasn't found in the specified tenant.|Ensure the client and tenant IDs provided to the credential constructor are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the [Azure AD instructions](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).|
|
||||
|AADSTS700027|Client assertion contains an invalid signature.|Ensure the specified certificate has been uploaded to the application registration as described in [Microsoft Entra ID documentation](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-1-upload-a-certificate).|
|
||||
|AADSTS700016|The specified application wasn't found in the specified tenant.|Ensure the client and tenant IDs provided to the credential constructor are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the [Microsoft Entra ID instructions](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).|
|
||||
|
||||
<a id="username-password"></a>
|
||||
## Troubleshoot UsernamePasswordCredential authentication issues
|
||||
|
|
@ -172,7 +173,7 @@ curl "$IDENTITY_ENDPOINT?resource=https://management.core.windows.net&api-versio
|
|||
|"no azure identity found for request clientID"|The application attempted to authenticate before an identity was assigned to its pod|Verify the pod is labeled correctly. This also occurs when a correctly labeled pod authenticates before the identity is ready. To prevent initialization races, configure NMI to set the Retry-After header in its responses as described in [Pod Identity documentation](https://azure.github.io/aad-pod-identity/docs/configure/feature_flags/#set-retry-after-header-in-nmi-response).
|
||||
|
||||
<a id="azure-cli"></a>
|
||||
## Troubleshoot AzureCliCredential authentication issues
|
||||
## Troubleshoot AzureCLICredential authentication issues
|
||||
|
||||
| Error Message |Description| Mitigation |
|
||||
|---|---|---|
|
||||
|
|
@ -195,6 +196,29 @@ az account get-access-token --output json --resource https://management.core.win
|
|||
|
||||
> This command's output will contain an access token and SHOULD NOT BE SHARED, to avoid compromising account security.
|
||||
|
||||
<a id="azd"></a>
|
||||
## Troubleshoot AzureDeveloperCLICredential authentication issues
|
||||
|
||||
| Error Message |Description| Mitigation |
|
||||
|---|---|---|
|
||||
|Azure Developer CLI not found on path|The Azure Developer CLI isn't installed or couldn't be found.|<ul><li>Ensure the Azure Developer CLI is properly installed. See the installation instructions at [Install or update the Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd).</li><li>Validate the installation location has been added to the `PATH` environment variable.</li></ul>|
|
||||
|Please run "azd auth login"|No account is logged into the Azure Developer CLI, or the login has expired.|<ul><li>Log in to the Azure Developer CLI using the `azd login` command.</li><li>Validate that the Azure Developer CLI can obtain tokens. For instructions, see [Verify the Azure Developer CLI can obtain tokens](#verify-the-azure-developer-cli-can-obtain-tokens).</li></ul>|
|
||||
|
||||
#### Verify the Azure Developer CLI can obtain tokens
|
||||
|
||||
You can manually verify that the Azure Developer CLI is properly authenticated and can obtain tokens. First, use the `config` command to verify the account that is currently logged in to the Azure Developer CLI.
|
||||
|
||||
```sh
|
||||
azd config list
|
||||
```
|
||||
|
||||
Once you've verified the Azure Developer CLI is using correct account, you can validate that it's able to obtain tokens for this account.
|
||||
|
||||
```sh
|
||||
azd auth token --output json --scope https://management.core.windows.net/.default
|
||||
```
|
||||
>Note that output of this command will contain a valid access token, and SHOULD NOT BE SHARED to avoid compromising account security.
|
||||
|
||||
<a id="workload"></a>
|
||||
## Troubleshoot `WorkloadIdentityCredential` authentication issues
|
||||
|
||||
|
|
|
|||
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/assets.json
generated
vendored
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/assets.json
generated
vendored
|
|
@ -2,5 +2,5 @@
|
|||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "go",
|
||||
"TagPrefix": "go/azidentity",
|
||||
"Tag": "go/azidentity_6225ab0470"
|
||||
"Tag": "go/azidentity_db4a26f583"
|
||||
}
|
||||
|
|
|
|||
95
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/authentication_record.go
generated
vendored
Normal file
95
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/authentication_record.go
generated
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
package azidentity
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/public"
|
||||
)
|
||||
|
||||
var supportedAuthRecordVersions = []string{"1.0"}
|
||||
|
||||
// authenticationRecord is non-secret account information about an authenticated user that user credentials such as
|
||||
// [DeviceCodeCredential] and [InteractiveBrowserCredential] can use to access previously cached authentication
|
||||
// data. Call these credentials' Authenticate method to get an authenticationRecord for a user.
|
||||
type authenticationRecord struct {
|
||||
// Authority is the URL of the authority that issued the token.
|
||||
Authority string `json:"authority"`
|
||||
|
||||
// ClientID is the ID of the application that authenticated the user.
|
||||
ClientID string `json:"clientId"`
|
||||
|
||||
// HomeAccountID uniquely identifies the account.
|
||||
HomeAccountID string `json:"homeAccountId"`
|
||||
|
||||
// TenantID identifies the tenant in which the user authenticated.
|
||||
TenantID string `json:"tenantId"`
|
||||
|
||||
// Username is the user's preferred username.
|
||||
Username string `json:"username"`
|
||||
|
||||
// Version of the AuthenticationRecord.
|
||||
Version string `json:"version"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements json.Unmarshaler for AuthenticationRecord
|
||||
func (a *authenticationRecord) UnmarshalJSON(b []byte) error {
|
||||
// Default unmarshaling is fine but we want to return an error if the record's version isn't supported i.e., we
|
||||
// want to inspect the unmarshalled values before deciding whether to return an error. Unmarshaling a formally
|
||||
// different type enables this by assigning all the fields without recursing into this method.
|
||||
type r authenticationRecord
|
||||
err := json.Unmarshal(b, (*r)(a))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if a.Version == "" {
|
||||
return errors.New("AuthenticationRecord must have a version")
|
||||
}
|
||||
for _, v := range supportedAuthRecordVersions {
|
||||
if a.Version == v {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return fmt.Errorf("unsupported AuthenticationRecord version %q. This module supports %v", a.Version, supportedAuthRecordVersions)
|
||||
}
|
||||
|
||||
// account returns the AuthenticationRecord as an MSAL Account. The account is zero-valued when the AuthenticationRecord is zero-valued.
|
||||
func (a *authenticationRecord) account() public.Account {
|
||||
return public.Account{
|
||||
Environment: a.Authority,
|
||||
HomeAccountID: a.HomeAccountID,
|
||||
PreferredUsername: a.Username,
|
||||
}
|
||||
}
|
||||
|
||||
func newAuthenticationRecord(ar public.AuthResult) (authenticationRecord, error) {
|
||||
u, err := url.Parse(ar.IDToken.Issuer)
|
||||
if err != nil {
|
||||
return authenticationRecord{}, fmt.Errorf("Authenticate expected a URL issuer but got %q", ar.IDToken.Issuer)
|
||||
}
|
||||
tenant := ar.IDToken.TenantID
|
||||
if tenant == "" {
|
||||
tenant = strings.Trim(u.Path, "/")
|
||||
}
|
||||
username := ar.IDToken.PreferredUsername
|
||||
if username == "" {
|
||||
username = ar.IDToken.UPN
|
||||
}
|
||||
return authenticationRecord{
|
||||
Authority: fmt.Sprintf("%s://%s", u.Scheme, u.Host),
|
||||
ClientID: ar.IDToken.Audience,
|
||||
HomeAccountID: ar.Account.HomeAccountID,
|
||||
TenantID: tenant,
|
||||
Username: username,
|
||||
Version: "1.0",
|
||||
}, nil
|
||||
}
|
||||
51
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
generated
vendored
51
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
generated
vendored
|
|
@ -15,12 +15,12 @@ import (
|
|||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"regexp"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/public"
|
||||
)
|
||||
|
|
@ -41,6 +41,10 @@ const (
|
|||
organizationsTenantID = "organizations"
|
||||
developerSignOnClientID = "04b07795-8ddb-461a-bbee-02f9e1bf7b46"
|
||||
defaultSuffix = "/.default"
|
||||
|
||||
traceNamespace = "Microsoft.Entra"
|
||||
traceOpGetToken = "GetToken"
|
||||
traceOpAuthenticate = "Authenticate"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -49,6 +53,9 @@ var (
|
|||
errInvalidTenantID = errors.New("invalid tenantID. You can locate your tenantID by following the instructions listed here: https://learn.microsoft.com/partner-center/find-ids-and-domain-names")
|
||||
)
|
||||
|
||||
// tokenCachePersistenceOptions contains options for persistent token caching
|
||||
type tokenCachePersistenceOptions = internal.TokenCachePersistenceOptions
|
||||
|
||||
// setAuthorityHost initializes the authority host for credentials. Precedence is:
|
||||
// 1. cloud.Configuration.ActiveDirectoryAuthorityHost value set by user
|
||||
// 2. value of AZURE_AUTHORITY_HOST
|
||||
|
|
@ -109,29 +116,20 @@ func resolveTenant(defaultTenant, specified, credName string, additionalTenants
|
|||
return "", fmt.Errorf(`%s isn't configured to acquire tokens for tenant %q. To enable acquiring tokens for this tenant add it to the AdditionallyAllowedTenants on the credential options, or add "*" to allow acquiring tokens for any tenant`, credName, specified)
|
||||
}
|
||||
|
||||
// validTenantID return true is it receives a valid tenantID, returns false otherwise
|
||||
func alphanumeric(r rune) bool {
|
||||
return ('0' <= r && r <= '9') || ('a' <= r && r <= 'z') || ('A' <= r && r <= 'Z')
|
||||
}
|
||||
|
||||
func validTenantID(tenantID string) bool {
|
||||
match, err := regexp.MatchString("^[0-9a-zA-Z-.]+$", tenantID)
|
||||
if err != nil {
|
||||
return false
|
||||
for _, r := range tenantID {
|
||||
if !(alphanumeric(r) || r == '.' || r == '-') {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return match
|
||||
return true
|
||||
}
|
||||
|
||||
func newPipelineAdapter(opts *azcore.ClientOptions) pipelineAdapter {
|
||||
pl := runtime.NewPipeline(component, version, runtime.PipelineOptions{}, opts)
|
||||
return pipelineAdapter{pl: pl}
|
||||
}
|
||||
|
||||
type pipelineAdapter struct {
|
||||
pl runtime.Pipeline
|
||||
}
|
||||
|
||||
func (p pipelineAdapter) CloseIdleConnections() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
func (p pipelineAdapter) Do(r *http.Request) (*http.Response, error) {
|
||||
func doForClient(client *azcore.Client, r *http.Request) (*http.Response, error) {
|
||||
req, err := runtime.NewRequest(r.Context(), r.Method, r.URL.String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -153,7 +151,18 @@ func (p pipelineAdapter) Do(r *http.Request) (*http.Response, error) {
|
|||
return nil, err
|
||||
}
|
||||
}
|
||||
resp, err := p.pl.Do(req)
|
||||
|
||||
// copy headers to the new request, ignoring any for which the new request has a value
|
||||
h := req.Raw().Header
|
||||
for key, vals := range r.Header {
|
||||
if _, has := h[key]; !has {
|
||||
for _, val := range vals {
|
||||
h.Add(key, val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resp, err := client.Pipeline().Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
70
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_cli_credential.go
generated
vendored
70
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_cli_credential.go
generated
vendored
|
|
@ -14,7 +14,6 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
|
|
@ -25,13 +24,9 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/internal/log"
|
||||
)
|
||||
|
||||
const (
|
||||
credNameAzureCLI = "AzureCLICredential"
|
||||
timeoutCLIRequest = 10 * time.Second
|
||||
)
|
||||
const credNameAzureCLI = "AzureCLICredential"
|
||||
|
||||
// used by tests to fake invoking the CLI
|
||||
type azureCLITokenProvider func(ctx context.Context, resource string, tenantID string) ([]byte, error)
|
||||
type azTokenProvider func(ctx context.Context, scopes []string, tenant, subscription string) ([]byte, error)
|
||||
|
||||
// AzureCLICredentialOptions contains optional parameters for AzureCLICredential.
|
||||
type AzureCLICredentialOptions struct {
|
||||
|
|
@ -39,17 +34,25 @@ type AzureCLICredentialOptions struct {
|
|||
// to TenantID. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the
|
||||
// logged in account can access.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// subscription is the name or ID of a subscription. Set this to acquire tokens for an account other
|
||||
// than the Azure CLI's current account.
|
||||
subscription string
|
||||
|
||||
// TenantID identifies the tenant the credential should authenticate in.
|
||||
// Defaults to the CLI's default tenant, which is typically the home tenant of the logged in user.
|
||||
TenantID string
|
||||
|
||||
tokenProvider azureCLITokenProvider
|
||||
// inDefaultChain is true when the credential is part of DefaultAzureCredential
|
||||
inDefaultChain bool
|
||||
// tokenProvider is used by tests to fake invoking az
|
||||
tokenProvider azTokenProvider
|
||||
}
|
||||
|
||||
// init returns an instance of AzureCLICredentialOptions initialized with default values.
|
||||
func (o *AzureCLICredentialOptions) init() {
|
||||
if o.tokenProvider == nil {
|
||||
o.tokenProvider = defaultTokenProvider
|
||||
o.tokenProvider = defaultAzTokenProvider
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -65,6 +68,14 @@ func NewAzureCLICredential(options *AzureCLICredentialOptions) (*AzureCLICredent
|
|||
if options != nil {
|
||||
cp = *options
|
||||
}
|
||||
for _, r := range cp.subscription {
|
||||
if !(alphanumeric(r) || r == '-' || r == '_' || r == ' ' || r == '.') {
|
||||
return nil, fmt.Errorf("%s: invalid Subscription %q", credNameAzureCLI, cp.subscription)
|
||||
}
|
||||
}
|
||||
if cp.TenantID != "" && !validTenantID(cp.TenantID) {
|
||||
return nil, errInvalidTenantID
|
||||
}
|
||||
cp.init()
|
||||
cp.AdditionallyAllowedTenants = resolveAdditionalTenants(cp.AdditionallyAllowedTenants)
|
||||
return &AzureCLICredential{mu: &sync.Mutex{}, opts: cp}, nil
|
||||
|
|
@ -73,50 +84,51 @@ func NewAzureCLICredential(options *AzureCLICredentialOptions) (*AzureCLICredent
|
|||
// GetToken requests a token from the Azure CLI. This credential doesn't cache tokens, so every call invokes the CLI.
|
||||
// This method is called automatically by Azure SDK clients.
|
||||
func (c *AzureCLICredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
at := azcore.AccessToken{}
|
||||
if len(opts.Scopes) != 1 {
|
||||
return azcore.AccessToken{}, errors.New(credNameAzureCLI + ": GetToken() requires exactly one scope")
|
||||
return at, errors.New(credNameAzureCLI + ": GetToken() requires exactly one scope")
|
||||
}
|
||||
if !validScope(opts.Scopes[0]) {
|
||||
return at, fmt.Errorf("%s.GetToken(): invalid scope %q", credNameAzureCLI, opts.Scopes[0])
|
||||
}
|
||||
tenant, err := resolveTenant(c.opts.TenantID, opts.TenantID, credNameAzureCLI, c.opts.AdditionallyAllowedTenants)
|
||||
if err != nil {
|
||||
return azcore.AccessToken{}, err
|
||||
return at, err
|
||||
}
|
||||
// pass the CLI an AAD v1 resource because we don't know which CLI version is installed and older ones don't support v2 scopes
|
||||
opts.Scopes = []string{strings.TrimSuffix(opts.Scopes[0], defaultSuffix)}
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
b, err := c.opts.tokenProvider(ctx, opts.Scopes[0], tenant)
|
||||
if err != nil {
|
||||
return azcore.AccessToken{}, err
|
||||
b, err := c.opts.tokenProvider(ctx, opts.Scopes, tenant, c.opts.subscription)
|
||||
if err == nil {
|
||||
at, err = c.createAccessToken(b)
|
||||
}
|
||||
at, err := c.createAccessToken(b)
|
||||
if err != nil {
|
||||
return azcore.AccessToken{}, err
|
||||
err = unavailableIfInChain(err, c.opts.inDefaultChain)
|
||||
return at, err
|
||||
}
|
||||
msg := fmt.Sprintf("%s.GetToken() acquired a token for scope %q", credNameAzureCLI, strings.Join(opts.Scopes, ", "))
|
||||
log.Write(EventAuthentication, msg)
|
||||
return at, nil
|
||||
}
|
||||
|
||||
var defaultTokenProvider azureCLITokenProvider = func(ctx context.Context, resource string, tenantID string) ([]byte, error) {
|
||||
match, err := regexp.MatchString("^[0-9a-zA-Z-.:/]+$", resource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !match {
|
||||
return nil, fmt.Errorf(`%s: unexpected scope "%s". Only alphanumeric characters and ".", ";", "-", and "/" are allowed`, credNameAzureCLI, resource)
|
||||
}
|
||||
|
||||
// defaultAzTokenProvider invokes the Azure CLI to acquire a token. It assumes
|
||||
// callers have verified that all string arguments are safe to pass to the CLI.
|
||||
var defaultAzTokenProvider azTokenProvider = func(ctx context.Context, scopes []string, tenantID, subscription string) ([]byte, error) {
|
||||
// pass the CLI a Microsoft Entra ID v1 resource because we don't know which CLI version is installed and older ones don't support v2 scopes
|
||||
resource := strings.TrimSuffix(scopes[0], defaultSuffix)
|
||||
// set a default timeout for this authentication iff the application hasn't done so already
|
||||
var cancel context.CancelFunc
|
||||
if _, hasDeadline := ctx.Deadline(); !hasDeadline {
|
||||
ctx, cancel = context.WithTimeout(ctx, timeoutCLIRequest)
|
||||
ctx, cancel = context.WithTimeout(ctx, cliTimeout)
|
||||
defer cancel()
|
||||
}
|
||||
|
||||
commandLine := "az account get-access-token -o json --resource " + resource
|
||||
if tenantID != "" {
|
||||
commandLine += " --tenant " + tenantID
|
||||
}
|
||||
if subscription != "" {
|
||||
// subscription needs quotes because it may contain spaces
|
||||
commandLine += ` --subscription "` + subscription + `"`
|
||||
}
|
||||
var cliCmd *exec.Cmd
|
||||
if runtime.GOOS == "windows" {
|
||||
dir := os.Getenv("SYSTEMROOT")
|
||||
|
|
|
|||
169
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_developer_cli_credential.go
generated
vendored
Normal file
169
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_developer_cli_credential.go
generated
vendored
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
package azidentity
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/internal/log"
|
||||
)
|
||||
|
||||
const credNameAzureDeveloperCLI = "AzureDeveloperCLICredential"
|
||||
|
||||
type azdTokenProvider func(ctx context.Context, scopes []string, tenant string) ([]byte, error)
|
||||
|
||||
// AzureDeveloperCLICredentialOptions contains optional parameters for AzureDeveloperCLICredential.
|
||||
type AzureDeveloperCLICredentialOptions struct {
|
||||
// AdditionallyAllowedTenants specifies tenants for which the credential may acquire tokens, in addition
|
||||
// to TenantID. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the
|
||||
// logged in account can access.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// TenantID identifies the tenant the credential should authenticate in. Defaults to the azd environment,
|
||||
// which is the tenant of the selected Azure subscription.
|
||||
TenantID string
|
||||
|
||||
// inDefaultChain is true when the credential is part of DefaultAzureCredential
|
||||
inDefaultChain bool
|
||||
// tokenProvider is used by tests to fake invoking azd
|
||||
tokenProvider azdTokenProvider
|
||||
}
|
||||
|
||||
// AzureDeveloperCLICredential authenticates as the identity logged in to the [Azure Developer CLI].
|
||||
//
|
||||
// [Azure Developer CLI]: https://learn.microsoft.com/azure/developer/azure-developer-cli/overview
|
||||
type AzureDeveloperCLICredential struct {
|
||||
mu *sync.Mutex
|
||||
opts AzureDeveloperCLICredentialOptions
|
||||
}
|
||||
|
||||
// NewAzureDeveloperCLICredential constructs an AzureDeveloperCLICredential. Pass nil to accept default options.
|
||||
func NewAzureDeveloperCLICredential(options *AzureDeveloperCLICredentialOptions) (*AzureDeveloperCLICredential, error) {
|
||||
cp := AzureDeveloperCLICredentialOptions{}
|
||||
if options != nil {
|
||||
cp = *options
|
||||
}
|
||||
if cp.TenantID != "" && !validTenantID(cp.TenantID) {
|
||||
return nil, errInvalidTenantID
|
||||
}
|
||||
if cp.tokenProvider == nil {
|
||||
cp.tokenProvider = defaultAzdTokenProvider
|
||||
}
|
||||
return &AzureDeveloperCLICredential{mu: &sync.Mutex{}, opts: cp}, nil
|
||||
}
|
||||
|
||||
// GetToken requests a token from the Azure Developer CLI. This credential doesn't cache tokens, so every call invokes azd.
|
||||
// This method is called automatically by Azure SDK clients.
|
||||
func (c *AzureDeveloperCLICredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
at := azcore.AccessToken{}
|
||||
if len(opts.Scopes) == 0 {
|
||||
return at, errors.New(credNameAzureDeveloperCLI + ": GetToken() requires at least one scope")
|
||||
}
|
||||
for _, scope := range opts.Scopes {
|
||||
if !validScope(scope) {
|
||||
return at, fmt.Errorf("%s.GetToken(): invalid scope %q", credNameAzureDeveloperCLI, scope)
|
||||
}
|
||||
}
|
||||
tenant, err := resolveTenant(c.opts.TenantID, opts.TenantID, credNameAzureDeveloperCLI, c.opts.AdditionallyAllowedTenants)
|
||||
if err != nil {
|
||||
return at, err
|
||||
}
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
b, err := c.opts.tokenProvider(ctx, opts.Scopes, tenant)
|
||||
if err == nil {
|
||||
at, err = c.createAccessToken(b)
|
||||
}
|
||||
if err != nil {
|
||||
err = unavailableIfInChain(err, c.opts.inDefaultChain)
|
||||
return at, err
|
||||
}
|
||||
msg := fmt.Sprintf("%s.GetToken() acquired a token for scope %q", credNameAzureDeveloperCLI, strings.Join(opts.Scopes, ", "))
|
||||
log.Write(EventAuthentication, msg)
|
||||
return at, nil
|
||||
}
|
||||
|
||||
// defaultAzTokenProvider invokes the Azure Developer CLI to acquire a token. It assumes
|
||||
// callers have verified that all string arguments are safe to pass to the CLI.
|
||||
var defaultAzdTokenProvider azdTokenProvider = func(ctx context.Context, scopes []string, tenant string) ([]byte, error) {
|
||||
// set a default timeout for this authentication iff the application hasn't done so already
|
||||
var cancel context.CancelFunc
|
||||
if _, hasDeadline := ctx.Deadline(); !hasDeadline {
|
||||
ctx, cancel = context.WithTimeout(ctx, cliTimeout)
|
||||
defer cancel()
|
||||
}
|
||||
commandLine := "azd auth token -o json"
|
||||
if tenant != "" {
|
||||
commandLine += " --tenant-id " + tenant
|
||||
}
|
||||
for _, scope := range scopes {
|
||||
commandLine += " --scope " + scope
|
||||
}
|
||||
var cliCmd *exec.Cmd
|
||||
if runtime.GOOS == "windows" {
|
||||
dir := os.Getenv("SYSTEMROOT")
|
||||
if dir == "" {
|
||||
return nil, newCredentialUnavailableError(credNameAzureDeveloperCLI, "environment variable 'SYSTEMROOT' has no value")
|
||||
}
|
||||
cliCmd = exec.CommandContext(ctx, "cmd.exe", "/c", commandLine)
|
||||
cliCmd.Dir = dir
|
||||
} else {
|
||||
cliCmd = exec.CommandContext(ctx, "/bin/sh", "-c", commandLine)
|
||||
cliCmd.Dir = "/bin"
|
||||
}
|
||||
cliCmd.Env = os.Environ()
|
||||
var stderr bytes.Buffer
|
||||
cliCmd.Stderr = &stderr
|
||||
output, err := cliCmd.Output()
|
||||
if err != nil {
|
||||
msg := stderr.String()
|
||||
var exErr *exec.ExitError
|
||||
if errors.As(err, &exErr) && exErr.ExitCode() == 127 || strings.HasPrefix(msg, "'azd' is not recognized") {
|
||||
msg = "Azure Developer CLI not found on path"
|
||||
} else if strings.Contains(msg, "azd auth login") {
|
||||
msg = `please run "azd auth login" from a command prompt to authenticate before using this credential`
|
||||
}
|
||||
if msg == "" {
|
||||
msg = err.Error()
|
||||
}
|
||||
return nil, newCredentialUnavailableError(credNameAzureDeveloperCLI, msg)
|
||||
}
|
||||
return output, nil
|
||||
}
|
||||
|
||||
func (c *AzureDeveloperCLICredential) createAccessToken(tk []byte) (azcore.AccessToken, error) {
|
||||
t := struct {
|
||||
AccessToken string `json:"token"`
|
||||
ExpiresOn string `json:"expiresOn"`
|
||||
}{}
|
||||
err := json.Unmarshal(tk, &t)
|
||||
if err != nil {
|
||||
return azcore.AccessToken{}, err
|
||||
}
|
||||
exp, err := time.Parse("2006-01-02T15:04:05Z", t.ExpiresOn)
|
||||
if err != nil {
|
||||
return azcore.AccessToken{}, fmt.Errorf("error parsing token expiration time %q: %v", t.ExpiresOn, err)
|
||||
}
|
||||
return azcore.AccessToken{
|
||||
ExpiresOn: exp.UTC(),
|
||||
Token: t.AccessToken,
|
||||
}, nil
|
||||
}
|
||||
|
||||
var _ azcore.TokenCredential = (*AzureDeveloperCLICredential)(nil)
|
||||
1
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/ci.yml
generated
vendored
1
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/ci.yml
generated
vendored
|
|
@ -25,6 +25,7 @@ stages:
|
|||
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
|
||||
parameters:
|
||||
RunLiveTests: true
|
||||
UsePipelineProxy: false
|
||||
ServiceDirectory: 'azidentity'
|
||||
CloudConfig:
|
||||
Public:
|
||||
|
|
|
|||
26
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/client_assertion_credential.go
generated
vendored
26
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/client_assertion_credential.go
generated
vendored
|
|
@ -12,6 +12,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
|
||||
)
|
||||
|
||||
|
|
@ -20,9 +21,9 @@ const credNameAssertion = "ClientAssertionCredential"
|
|||
// ClientAssertionCredential authenticates an application with assertions provided by a callback function.
|
||||
// This credential is for advanced scenarios. [ClientCertificateCredential] has a more convenient API for
|
||||
// the most common assertion scenario, authenticating a service principal with a certificate. See
|
||||
// [Azure AD documentation] for details of the assertion format.
|
||||
// [Microsoft Entra ID documentation] for details of the assertion format.
|
||||
//
|
||||
// [Azure AD documentation]: https://docs.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials#assertion-format
|
||||
// [Microsoft Entra ID documentation]: https://learn.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials#assertion-format
|
||||
type ClientAssertionCredential struct {
|
||||
client *confidentialClient
|
||||
}
|
||||
|
|
@ -35,11 +36,15 @@ type ClientAssertionCredentialOptions struct {
|
|||
// Add the wildcard value "*" to allow the credential to acquire tokens for any tenant in which the
|
||||
// application is registered.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
||||
// tokenCachePersistenceOptions enables persistent token caching when not nil.
|
||||
tokenCachePersistenceOptions *tokenCachePersistenceOptions
|
||||
}
|
||||
|
||||
// NewClientAssertionCredential constructs a ClientAssertionCredential. The getAssertion function must be thread safe. Pass nil for options to accept defaults.
|
||||
|
|
@ -56,9 +61,10 @@ func NewClientAssertionCredential(tenantID, clientID string, getAssertion func(c
|
|||
},
|
||||
)
|
||||
msalOpts := confidentialClientOptions{
|
||||
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
|
||||
ClientOptions: options.ClientOptions,
|
||||
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
|
||||
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
|
||||
ClientOptions: options.ClientOptions,
|
||||
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
|
||||
tokenCachePersistenceOptions: options.tokenCachePersistenceOptions,
|
||||
}
|
||||
c, err := newConfidentialClient(tenantID, clientID, credNameAssertion, cred, msalOpts)
|
||||
if err != nil {
|
||||
|
|
@ -67,9 +73,13 @@ func NewClientAssertionCredential(tenantID, clientID string, getAssertion func(c
|
|||
return &ClientAssertionCredential{client: c}, nil
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. This method is called automatically by Azure SDK clients.
|
||||
// GetToken requests an access token from Microsoft Entra ID. This method is called automatically by Azure SDK clients.
|
||||
func (c *ClientAssertionCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return c.client.GetToken(ctx, opts)
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameAssertion+"."+traceOpGetToken, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
var _ azcore.TokenCredential = (*ClientAssertionCredential)(nil)
|
||||
|
|
|
|||
25
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/client_certificate_credential.go
generated
vendored
25
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/client_certificate_credential.go
generated
vendored
|
|
@ -15,6 +15,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
|
||||
"golang.org/x/crypto/pkcs12"
|
||||
)
|
||||
|
|
@ -29,15 +30,20 @@ type ClientCertificateCredentialOptions struct {
|
|||
// Add the wildcard value "*" to allow the credential to acquire tokens for any tenant in which the
|
||||
// application is registered.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
||||
// SendCertificateChain controls whether the credential sends the public certificate chain in the x5c
|
||||
// header of each token request's JWT. This is required for Subject Name/Issuer (SNI) authentication.
|
||||
// Defaults to False.
|
||||
SendCertificateChain bool
|
||||
|
||||
// tokenCachePersistenceOptions enables persistent token caching when not nil.
|
||||
tokenCachePersistenceOptions *tokenCachePersistenceOptions
|
||||
}
|
||||
|
||||
// ClientCertificateCredential authenticates a service principal with a certificate.
|
||||
|
|
@ -58,10 +64,11 @@ func NewClientCertificateCredential(tenantID string, clientID string, certs []*x
|
|||
return nil, err
|
||||
}
|
||||
msalOpts := confidentialClientOptions{
|
||||
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
|
||||
ClientOptions: options.ClientOptions,
|
||||
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
|
||||
SendX5C: options.SendCertificateChain,
|
||||
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
|
||||
ClientOptions: options.ClientOptions,
|
||||
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
|
||||
SendX5C: options.SendCertificateChain,
|
||||
tokenCachePersistenceOptions: options.tokenCachePersistenceOptions,
|
||||
}
|
||||
c, err := newConfidentialClient(tenantID, clientID, credNameCert, cred, msalOpts)
|
||||
if err != nil {
|
||||
|
|
@ -70,9 +77,13 @@ func NewClientCertificateCredential(tenantID string, clientID string, certs []*x
|
|||
return &ClientCertificateCredential{client: c}, nil
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. This method is called automatically by Azure SDK clients.
|
||||
// GetToken requests an access token from Microsoft Entra ID. This method is called automatically by Azure SDK clients.
|
||||
func (c *ClientCertificateCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return c.client.GetToken(ctx, opts)
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameCert+"."+traceOpGetToken, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
// ParseCertificates loads certificates and a private key, in PEM or PKCS12 format, for use with NewClientCertificateCredential.
|
||||
|
|
|
|||
24
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/client_secret_credential.go
generated
vendored
24
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/client_secret_credential.go
generated
vendored
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
|
||||
)
|
||||
|
||||
|
|
@ -24,11 +25,15 @@ type ClientSecretCredentialOptions struct {
|
|||
// Add the wildcard value "*" to allow the credential to acquire tokens for any tenant in which the
|
||||
// application is registered.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
||||
// tokenCachePersistenceOptions enables persistent token caching when not nil.
|
||||
tokenCachePersistenceOptions *tokenCachePersistenceOptions
|
||||
}
|
||||
|
||||
// ClientSecretCredential authenticates an application with a client secret.
|
||||
|
|
@ -46,20 +51,25 @@ func NewClientSecretCredential(tenantID string, clientID string, clientSecret st
|
|||
return nil, err
|
||||
}
|
||||
msalOpts := confidentialClientOptions{
|
||||
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
|
||||
ClientOptions: options.ClientOptions,
|
||||
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
|
||||
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
|
||||
ClientOptions: options.ClientOptions,
|
||||
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
|
||||
tokenCachePersistenceOptions: options.tokenCachePersistenceOptions,
|
||||
}
|
||||
c, err := newConfidentialClient(tenantID, clientID, credNameSecret, cred, msalOpts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ClientSecretCredential{c}, nil
|
||||
return &ClientSecretCredential{client: c}, nil
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. This method is called automatically by Azure SDK clients.
|
||||
// GetToken requests an access token from Microsoft Entra ID. This method is called automatically by Azure SDK clients.
|
||||
func (c *ClientSecretCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return c.client.GetToken(ctx, opts)
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameSecret+"."+traceOpGetToken, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
var _ azcore.TokenCredential = (*ClientSecretCredential)(nil)
|
||||
|
|
|
|||
32
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/confidential_client.go
generated
vendored
32
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/confidential_client.go
generated
vendored
|
|
@ -10,6 +10,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
|
@ -17,6 +18,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/internal/log"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
|
||||
)
|
||||
|
|
@ -28,6 +30,7 @@ type confidentialClientOptions struct {
|
|||
// Assertion for on-behalf-of authentication
|
||||
Assertion string
|
||||
DisableInstanceDiscovery, SendX5C bool
|
||||
tokenCachePersistenceOptions *tokenCachePersistenceOptions
|
||||
}
|
||||
|
||||
// confidentialClient wraps the MSAL confidential client
|
||||
|
|
@ -40,6 +43,7 @@ type confidentialClient struct {
|
|||
name string
|
||||
opts confidentialClientOptions
|
||||
region string
|
||||
azClient *azcore.Client
|
||||
}
|
||||
|
||||
func newConfidentialClient(tenantID, clientID, name string, cred confidential.Credential, opts confidentialClientOptions) (*confidentialClient, error) {
|
||||
|
|
@ -50,6 +54,14 @@ func newConfidentialClient(tenantID, clientID, name string, cred confidential.Cr
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := azcore.NewClient(module, version, runtime.PipelineOptions{
|
||||
Tracing: runtime.TracingOptions{
|
||||
Namespace: traceNamespace,
|
||||
},
|
||||
}, &opts.ClientOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
opts.AdditionallyAllowedTenants = resolveAdditionalTenants(opts.AdditionallyAllowedTenants)
|
||||
return &confidentialClient{
|
||||
caeMu: &sync.Mutex{},
|
||||
|
|
@ -62,6 +74,7 @@ func newConfidentialClient(tenantID, clientID, name string, cred confidential.Cr
|
|||
opts: opts,
|
||||
region: os.Getenv(azureRegionalAuthorityName),
|
||||
tenantID: tenantID,
|
||||
azClient: client,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
@ -132,10 +145,15 @@ func (c *confidentialClient) client(ctx context.Context, tro policy.TokenRequest
|
|||
}
|
||||
|
||||
func (c *confidentialClient) newMSALClient(enableCAE bool) (msalConfidentialClient, error) {
|
||||
cache, err := internal.NewCache(c.opts.tokenCachePersistenceOptions, enableCAE)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
authority := runtime.JoinPaths(c.host, c.tenantID)
|
||||
o := []confidential.Option{
|
||||
confidential.WithAzureRegion(c.region),
|
||||
confidential.WithHTTPClient(newPipelineAdapter(&c.opts.ClientOptions)),
|
||||
confidential.WithCache(cache),
|
||||
confidential.WithHTTPClient(c),
|
||||
}
|
||||
if enableCAE {
|
||||
o = append(o, confidential.WithClientCapabilities(cp1))
|
||||
|
|
@ -149,8 +167,18 @@ func (c *confidentialClient) newMSALClient(enableCAE bool) (msalConfidentialClie
|
|||
return confidential.New(authority, c.clientID, c.cred, o...)
|
||||
}
|
||||
|
||||
// resolveTenant returns the correct tenant for a token request given the client's
|
||||
// resolveTenant returns the correct WithTenantID() argument for a token request given the client's
|
||||
// configuration, or an error when that configuration doesn't allow the specified tenant
|
||||
func (c *confidentialClient) resolveTenant(specified string) (string, error) {
|
||||
return resolveTenant(c.tenantID, specified, c.name, c.opts.AdditionallyAllowedTenants)
|
||||
}
|
||||
|
||||
// these methods satisfy the MSAL ops.HTTPClient interface
|
||||
|
||||
func (c *confidentialClient) CloseIdleConnections() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
func (c *confidentialClient) Do(r *http.Request) (*http.Response, error) {
|
||||
return doForClient(c.azClient, r)
|
||||
}
|
||||
|
|
|
|||
16
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/default_azure_credential.go
generated
vendored
16
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/default_azure_credential.go
generated
vendored
|
|
@ -30,7 +30,7 @@ type DefaultAzureCredentialOptions struct {
|
|||
// set as a semicolon delimited list of tenants in the environment variable AZURE_ADDITIONALLY_ALLOWED_TENANTS.
|
||||
AdditionallyAllowedTenants []string
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
|
@ -49,6 +49,7 @@ type DefaultAzureCredentialOptions struct {
|
|||
// more control over its configuration.
|
||||
// - [ManagedIdentityCredential]
|
||||
// - [AzureCLICredential]
|
||||
// - [AzureDeveloperCLICredential]
|
||||
//
|
||||
// Consult the documentation for these credential types for more information on how they authenticate.
|
||||
// Once a credential has successfully authenticated, DefaultAzureCredential will use that credential for
|
||||
|
|
@ -117,6 +118,17 @@ func NewDefaultAzureCredential(options *DefaultAzureCredentialOptions) (*Default
|
|||
creds = append(creds, &defaultCredentialErrorReporter{credType: credNameAzureCLI, err: err})
|
||||
}
|
||||
|
||||
azdCred, err := NewAzureDeveloperCLICredential(&AzureDeveloperCLICredentialOptions{
|
||||
AdditionallyAllowedTenants: additionalTenants,
|
||||
TenantID: options.TenantID,
|
||||
})
|
||||
if err == nil {
|
||||
creds = append(creds, azdCred)
|
||||
} else {
|
||||
errorMessages = append(errorMessages, credNameAzureDeveloperCLI+": "+err.Error())
|
||||
creds = append(creds, &defaultCredentialErrorReporter{credType: credNameAzureDeveloperCLI, err: err})
|
||||
}
|
||||
|
||||
if len(errorMessages) > 0 {
|
||||
log.Writef(EventAuthentication, "NewDefaultAzureCredential failed to initialize some credentials:\n\t%s", strings.Join(errorMessages, "\n\t"))
|
||||
}
|
||||
|
|
@ -129,7 +141,7 @@ func NewDefaultAzureCredential(options *DefaultAzureCredentialOptions) (*Default
|
|||
return &DefaultAzureCredential{chain: chain}, nil
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. This method is called automatically by Azure SDK clients.
|
||||
// GetToken requests an access token from Microsoft Entra ID. This method is called automatically by Azure SDK clients.
|
||||
func (c *DefaultAzureCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return c.chain.GetToken(ctx, opts)
|
||||
}
|
||||
|
|
|
|||
38
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util.go
generated
vendored
Normal file
38
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util.go
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
package azidentity
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
// cliTimeout is the default timeout for authentication attempts via CLI tools
|
||||
const cliTimeout = 10 * time.Second
|
||||
|
||||
// unavailableIfInChain returns err or, if the credential was invoked by DefaultAzureCredential, a
|
||||
// credentialUnavailableError having the same message. This ensures DefaultAzureCredential will try
|
||||
// the next credential in its chain (another developer credential).
|
||||
func unavailableIfInChain(err error, inDefaultChain bool) error {
|
||||
if err != nil && inDefaultChain {
|
||||
var unavailableErr *credentialUnavailableError
|
||||
if !errors.As(err, &unavailableErr) {
|
||||
err = newCredentialUnavailableError(credNameAzureDeveloperCLI, err.Error())
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// validScope is for credentials authenticating via external tools. The authority validates scopes for all other credentials.
|
||||
func validScope(scope string) bool {
|
||||
for _, r := range scope {
|
||||
if !(alphanumeric(r) || r == '.' || r == '-' || r == '_' || r == '/' || r == ':') {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
54
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/device_code_credential.go
generated
vendored
54
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/device_code_credential.go
generated
vendored
|
|
@ -12,6 +12,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
)
|
||||
|
||||
const credNameDeviceCode = "DeviceCodeCredential"
|
||||
|
|
@ -23,19 +24,34 @@ type DeviceCodeCredentialOptions struct {
|
|||
// AdditionallyAllowedTenants specifies additional tenants for which the credential may acquire
|
||||
// tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// authenticationRecord returned by a call to a credential's Authenticate method. Set this option
|
||||
// to enable the credential to use data from a previous authentication.
|
||||
authenticationRecord authenticationRecord
|
||||
|
||||
// ClientID is the ID of the application users will authenticate to.
|
||||
// Defaults to the ID of an Azure development application.
|
||||
ClientID string
|
||||
|
||||
// disableAutomaticAuthentication prevents the credential from automatically prompting the user to authenticate.
|
||||
// When this option is true, [DeviceCodeCredential.GetToken] will return [ErrAuthenticationRequired] when user
|
||||
// interaction is necessary to acquire a token.
|
||||
disableAutomaticAuthentication bool
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
// TenantID is the Azure Active Directory tenant the credential authenticates in. Defaults to the
|
||||
|
||||
// TenantID is the Microsoft Entra tenant the credential authenticates in. Defaults to the
|
||||
// "organizations" tenant, which can authenticate work and school accounts. Required for single-tenant
|
||||
// applications.
|
||||
TenantID string
|
||||
|
||||
// tokenCachePersistenceOptions enables persistent token caching when not nil.
|
||||
tokenCachePersistenceOptions *tokenCachePersistenceOptions
|
||||
|
||||
// UserPrompt controls how the credential presents authentication instructions. The credential calls
|
||||
// this function with authentication details when it receives a device code. By default, the credential
|
||||
// prints these details to stdout.
|
||||
|
|
@ -63,14 +79,14 @@ type DeviceCodeMessage struct {
|
|||
UserCode string `json:"user_code"`
|
||||
// VerificationURL is the URL at which the user must authenticate.
|
||||
VerificationURL string `json:"verification_uri"`
|
||||
// Message is user instruction from Azure Active Directory.
|
||||
// Message is user instruction from Microsoft Entra ID.
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// DeviceCodeCredential acquires tokens for a user via the device code flow, which has the
|
||||
// user browse to an Azure Active Directory URL, enter a code, and authenticate. It's useful
|
||||
// user browse to a Microsoft Entra URL, enter a code, and authenticate. It's useful
|
||||
// for authenticating a user in an environment without a web browser, such as an SSH session.
|
||||
// If a web browser is available, InteractiveBrowserCredential is more convenient because it
|
||||
// If a web browser is available, [InteractiveBrowserCredential] is more convenient because it
|
||||
// automatically opens a browser to the login page.
|
||||
type DeviceCodeCredential struct {
|
||||
client *publicClient
|
||||
|
|
@ -84,10 +100,13 @@ func NewDeviceCodeCredential(options *DeviceCodeCredentialOptions) (*DeviceCodeC
|
|||
}
|
||||
cp.init()
|
||||
msalOpts := publicClientOptions{
|
||||
AdditionallyAllowedTenants: cp.AdditionallyAllowedTenants,
|
||||
ClientOptions: cp.ClientOptions,
|
||||
DeviceCodePrompt: cp.UserPrompt,
|
||||
DisableInstanceDiscovery: cp.DisableInstanceDiscovery,
|
||||
AdditionallyAllowedTenants: cp.AdditionallyAllowedTenants,
|
||||
ClientOptions: cp.ClientOptions,
|
||||
DeviceCodePrompt: cp.UserPrompt,
|
||||
DisableAutomaticAuthentication: cp.disableAutomaticAuthentication,
|
||||
DisableInstanceDiscovery: cp.DisableInstanceDiscovery,
|
||||
Record: cp.authenticationRecord,
|
||||
TokenCachePersistenceOptions: cp.tokenCachePersistenceOptions,
|
||||
}
|
||||
c, err := newPublicClient(cp.TenantID, cp.ClientID, credNameDeviceCode, msalOpts)
|
||||
if err != nil {
|
||||
|
|
@ -97,10 +116,23 @@ func NewDeviceCodeCredential(options *DeviceCodeCredentialOptions) (*DeviceCodeC
|
|||
return &DeviceCodeCredential{client: c}, nil
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. It will begin the device code flow and poll until the user completes authentication.
|
||||
// Authenticate a user via the device code flow. Subsequent calls to GetToken will automatically use the returned AuthenticationRecord.
|
||||
func (c *DeviceCodeCredential) authenticate(ctx context.Context, opts *policy.TokenRequestOptions) (authenticationRecord, error) {
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameDeviceCode+"."+traceOpAuthenticate, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.Authenticate(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Microsoft Entra ID. It will begin the device code flow and poll until the user completes authentication.
|
||||
// This method is called automatically by Azure SDK clients.
|
||||
func (c *DeviceCodeCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return c.client.GetToken(ctx, opts)
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameDeviceCode+"."+traceOpGetToken, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
var _ azcore.TokenCredential = (*DeviceCodeCredential)(nil)
|
||||
|
|
|
|||
4
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/environment_credential.go
generated
vendored
4
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/environment_credential.go
generated
vendored
|
|
@ -25,7 +25,7 @@ type EnvironmentCredentialOptions struct {
|
|||
azcore.ClientOptions
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
|
@ -156,7 +156,7 @@ func NewEnvironmentCredential(options *EnvironmentCredentialOptions) (*Environme
|
|||
return nil, errors.New("incomplete environment variable configuration. Only AZURE_TENANT_ID and AZURE_CLIENT_ID are set")
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. This method is called automatically by Azure SDK clients.
|
||||
// GetToken requests an access token from Microsoft Entra ID. This method is called automatically by Azure SDK clients.
|
||||
func (c *EnvironmentCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return c.cred.GetToken(ctx, opts)
|
||||
}
|
||||
|
|
|
|||
14
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go
generated
vendored
14
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go
generated
vendored
|
|
@ -18,6 +18,10 @@ import (
|
|||
msal "github.com/AzureAD/microsoft-authentication-library-for-go/apps/errors"
|
||||
)
|
||||
|
||||
// errAuthenticationRequired indicates a credential's Authenticate method must be called to acquire a token
|
||||
// because user interaction is required and the credential is configured not to automatically prompt the user.
|
||||
var errAuthenticationRequired error = &credentialUnavailableError{"can't acquire a token without user interaction. Call Authenticate to interactively authenticate a user"}
|
||||
|
||||
// getResponseFromError retrieves the response carried by
|
||||
// an AuthenticationFailedError or MSAL CallErr, if any
|
||||
func getResponseFromError(err error) *http.Response {
|
||||
|
|
@ -53,7 +57,13 @@ func (e *AuthenticationFailedError) Error() string {
|
|||
}
|
||||
msg := &bytes.Buffer{}
|
||||
fmt.Fprintf(msg, e.credType+" authentication failed\n")
|
||||
fmt.Fprintf(msg, "%s %s://%s%s\n", e.RawResponse.Request.Method, e.RawResponse.Request.URL.Scheme, e.RawResponse.Request.URL.Host, e.RawResponse.Request.URL.Path)
|
||||
if e.RawResponse.Request != nil {
|
||||
fmt.Fprintf(msg, "%s %s://%s%s\n", e.RawResponse.Request.Method, e.RawResponse.Request.URL.Scheme, e.RawResponse.Request.URL.Host, e.RawResponse.Request.URL.Path)
|
||||
} else {
|
||||
// this happens when the response is created from a custom HTTP transporter,
|
||||
// which doesn't guarantee to bind the original request to the response
|
||||
fmt.Fprintln(msg, "Request information not available")
|
||||
}
|
||||
fmt.Fprintln(msg, "--------------------------------------------------------------------------------")
|
||||
fmt.Fprintf(msg, "RESPONSE %s\n", e.RawResponse.Status)
|
||||
fmt.Fprintln(msg, "--------------------------------------------------------------------------------")
|
||||
|
|
@ -74,6 +84,8 @@ func (e *AuthenticationFailedError) Error() string {
|
|||
switch e.credType {
|
||||
case credNameAzureCLI:
|
||||
anchor = "azure-cli"
|
||||
case credNameAzureDeveloperCLI:
|
||||
anchor = "azd"
|
||||
case credNameCert:
|
||||
anchor = "client-cert"
|
||||
case credNameSecret:
|
||||
|
|
|
|||
6
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work
generated
vendored
Normal file
6
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
go 1.18
|
||||
|
||||
use (
|
||||
.
|
||||
./cache
|
||||
)
|
||||
39
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work.sum
generated
vendored
Normal file
39
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/go.work.sum
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0-beta.1 h1:ODs3brnqQM99Tq1PffODpAViYv3Bf8zOg464MU7p5ew=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0-beta.1/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0/go.mod h1:uReU2sSxZExRPBAg3qKzmAucSi51+SP1OhohieR821Q=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
|
||||
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
|
||||
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
)
|
||||
|
||||
const credNameBrowser = "InteractiveBrowserCredential"
|
||||
|
|
@ -22,26 +23,40 @@ type InteractiveBrowserCredentialOptions struct {
|
|||
// AdditionallyAllowedTenants specifies additional tenants for which the credential may acquire
|
||||
// tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// authenticationRecord returned by a call to a credential's Authenticate method. Set this option
|
||||
// to enable the credential to use data from a previous authentication.
|
||||
authenticationRecord authenticationRecord
|
||||
|
||||
// ClientID is the ID of the application users will authenticate to.
|
||||
// Defaults to the ID of an Azure development application.
|
||||
ClientID string
|
||||
|
||||
// disableAutomaticAuthentication prevents the credential from automatically prompting the user to authenticate.
|
||||
// When this option is true, [InteractiveBrowserCredential.GetToken] will return [ErrAuthenticationRequired] when
|
||||
// user interaction is necessary to acquire a token.
|
||||
disableAutomaticAuthentication bool
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
||||
// LoginHint pre-populates the account prompt with a username. Users may choose to authenticate a different account.
|
||||
LoginHint string
|
||||
// RedirectURL is the URL Azure Active Directory will redirect to with the access token. This is required
|
||||
|
||||
// RedirectURL is the URL Microsoft Entra ID will redirect to with the access token. This is required
|
||||
// only when setting ClientID, and must match a redirect URI in the application's registration.
|
||||
// Applications which have registered "http://localhost" as a redirect URI need not set this option.
|
||||
RedirectURL string
|
||||
|
||||
// TenantID is the Azure Active Directory tenant the credential authenticates in. Defaults to the
|
||||
// TenantID is the Microsoft Entra tenant the credential authenticates in. Defaults to the
|
||||
// "organizations" tenant, which can authenticate work and school accounts.
|
||||
TenantID string
|
||||
|
||||
// tokenCachePersistenceOptions enables persistent token caching when not nil.
|
||||
tokenCachePersistenceOptions *tokenCachePersistenceOptions
|
||||
}
|
||||
|
||||
func (o *InteractiveBrowserCredentialOptions) init() {
|
||||
|
|
@ -66,10 +81,14 @@ func NewInteractiveBrowserCredential(options *InteractiveBrowserCredentialOption
|
|||
}
|
||||
cp.init()
|
||||
msalOpts := publicClientOptions{
|
||||
ClientOptions: cp.ClientOptions,
|
||||
DisableInstanceDiscovery: cp.DisableInstanceDiscovery,
|
||||
LoginHint: cp.LoginHint,
|
||||
RedirectURL: cp.RedirectURL,
|
||||
AdditionallyAllowedTenants: cp.AdditionallyAllowedTenants,
|
||||
ClientOptions: cp.ClientOptions,
|
||||
DisableAutomaticAuthentication: cp.disableAutomaticAuthentication,
|
||||
DisableInstanceDiscovery: cp.DisableInstanceDiscovery,
|
||||
LoginHint: cp.LoginHint,
|
||||
Record: cp.authenticationRecord,
|
||||
RedirectURL: cp.RedirectURL,
|
||||
TokenCachePersistenceOptions: cp.tokenCachePersistenceOptions,
|
||||
}
|
||||
c, err := newPublicClient(cp.TenantID, cp.ClientID, credNameBrowser, msalOpts)
|
||||
if err != nil {
|
||||
|
|
@ -78,9 +97,22 @@ func NewInteractiveBrowserCredential(options *InteractiveBrowserCredentialOption
|
|||
return &InteractiveBrowserCredential{client: c}, nil
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. This method is called automatically by Azure SDK clients.
|
||||
// Authenticate a user via the default browser. Subsequent calls to GetToken will automatically use the returned AuthenticationRecord.
|
||||
func (c *InteractiveBrowserCredential) authenticate(ctx context.Context, opts *policy.TokenRequestOptions) (authenticationRecord, error) {
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameBrowser+"."+traceOpAuthenticate, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.Authenticate(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Microsoft Entra ID. This method is called automatically by Azure SDK clients.
|
||||
func (c *InteractiveBrowserCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return c.client.GetToken(ctx, opts)
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameBrowser+"."+traceOpGetToken, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
var _ azcore.TokenCredential = (*InteractiveBrowserCredential)(nil)
|
||||
|
|
|
|||
18
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal/exported.go
generated
vendored
Normal file
18
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal/exported.go
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
package internal
|
||||
|
||||
// TokenCachePersistenceOptions contains options for persistent token caching
|
||||
type TokenCachePersistenceOptions struct {
|
||||
// AllowUnencryptedStorage controls whether the cache should fall back to storing its data in plain text
|
||||
// when encryption isn't possible. Setting this true doesn't disable encryption. The cache always attempts
|
||||
// encryption before falling back to plaintext storage.
|
||||
AllowUnencryptedStorage bool
|
||||
|
||||
// Name identifies the cache. Set this to isolate data from other applications.
|
||||
Name string
|
||||
}
|
||||
31
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal/internal.go
generated
vendored
Normal file
31
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal/internal.go
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/cache"
|
||||
)
|
||||
|
||||
var errMissingImport = errors.New("import github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache to enable persistent caching")
|
||||
|
||||
// NewCache constructs a persistent token cache when "o" isn't nil. Applications that intend to
|
||||
// use a persistent cache must first import the cache module, which will replace this function
|
||||
// with a platform-specific implementation.
|
||||
var NewCache = func(o *TokenCachePersistenceOptions, enableCAE bool) (cache.ExportReplace, error) {
|
||||
if o == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, errMissingImport
|
||||
}
|
||||
|
||||
// CacheFilePath returns the path to the cache file for the given name.
|
||||
// Defining it in this package makes it available to azidentity tests.
|
||||
var CacheFilePath = func(name string) (string, error) {
|
||||
return "", errMissingImport
|
||||
}
|
||||
54
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
generated
vendored
54
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
generated
vendored
|
|
@ -28,12 +28,14 @@ import (
|
|||
|
||||
const (
|
||||
arcIMDSEndpoint = "IMDS_ENDPOINT"
|
||||
defaultIdentityClientID = "DEFAULT_IDENTITY_CLIENT_ID"
|
||||
identityEndpoint = "IDENTITY_ENDPOINT"
|
||||
identityHeader = "IDENTITY_HEADER"
|
||||
identityServerThumbprint = "IDENTITY_SERVER_THUMBPRINT"
|
||||
headerMetadata = "Metadata"
|
||||
imdsEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token"
|
||||
msiEndpoint = "MSI_ENDPOINT"
|
||||
msiSecret = "MSI_SECRET"
|
||||
imdsAPIVersion = "2018-02-01"
|
||||
azureArcAPIVersion = "2019-08-15"
|
||||
serviceFabricAPIVersion = "2019-07-01-preview"
|
||||
|
|
@ -47,6 +49,7 @@ type msiType int
|
|||
const (
|
||||
msiTypeAppService msiType = iota
|
||||
msiTypeAzureArc
|
||||
msiTypeAzureML
|
||||
msiTypeCloudShell
|
||||
msiTypeIMDS
|
||||
msiTypeServiceFabric
|
||||
|
|
@ -55,7 +58,7 @@ const (
|
|||
// managedIdentityClient provides the base for authenticating in managed identity environments
|
||||
// This type includes an runtime.Pipeline and TokenCredentialOptions.
|
||||
type managedIdentityClient struct {
|
||||
pipeline runtime.Pipeline
|
||||
azClient *azcore.Client
|
||||
msiType msiType
|
||||
endpoint string
|
||||
id ManagedIDKind
|
||||
|
|
@ -135,13 +138,27 @@ func newManagedIdentityClient(options *ManagedIdentityCredentialOptions) (*manag
|
|||
c.msiType = msiTypeAzureArc
|
||||
}
|
||||
} else if endpoint, ok := os.LookupEnv(msiEndpoint); ok {
|
||||
env = "Cloud Shell"
|
||||
c.endpoint = endpoint
|
||||
c.msiType = msiTypeCloudShell
|
||||
if _, ok := os.LookupEnv(msiSecret); ok {
|
||||
env = "Azure ML"
|
||||
c.msiType = msiTypeAzureML
|
||||
} else {
|
||||
env = "Cloud Shell"
|
||||
c.msiType = msiTypeCloudShell
|
||||
}
|
||||
} else {
|
||||
setIMDSRetryOptionDefaults(&cp.Retry)
|
||||
}
|
||||
c.pipeline = runtime.NewPipeline(component, version, runtime.PipelineOptions{}, &cp)
|
||||
|
||||
client, err := azcore.NewClient(module, version, runtime.PipelineOptions{
|
||||
Tracing: runtime.TracingOptions{
|
||||
Namespace: traceNamespace,
|
||||
},
|
||||
}, &cp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.azClient = client
|
||||
|
||||
if log.Should(EventAuthentication) {
|
||||
log.Writef(EventAuthentication, "Managed Identity Credential will use %s managed identity", env)
|
||||
|
|
@ -168,7 +185,7 @@ func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKi
|
|||
return azcore.AccessToken{}, err
|
||||
}
|
||||
|
||||
resp, err := c.pipeline.Do(msg)
|
||||
resp, err := c.azClient.Pipeline().Do(msg)
|
||||
if err != nil {
|
||||
return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, err.Error(), nil, err)
|
||||
}
|
||||
|
|
@ -247,6 +264,8 @@ func (c *managedIdentityClient) createAuthRequest(ctx context.Context, id Manage
|
|||
return nil, newAuthenticationFailedError(credNameManagedIdentity, msg, nil, err)
|
||||
}
|
||||
return c.createAzureArcAuthRequest(ctx, id, scopes, key)
|
||||
case msiTypeAzureML:
|
||||
return c.createAzureMLAuthRequest(ctx, id, scopes)
|
||||
case msiTypeServiceFabric:
|
||||
return c.createServiceFabricAuthRequest(ctx, id, scopes)
|
||||
case msiTypeCloudShell:
|
||||
|
|
@ -296,6 +315,29 @@ func (c *managedIdentityClient) createAppServiceAuthRequest(ctx context.Context,
|
|||
return request, nil
|
||||
}
|
||||
|
||||
func (c *managedIdentityClient) createAzureMLAuthRequest(ctx context.Context, id ManagedIDKind, scopes []string) (*policy.Request, error) {
|
||||
request, err := runtime.NewRequest(ctx, http.MethodGet, c.endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
request.Raw().Header.Set("secret", os.Getenv(msiSecret))
|
||||
q := request.Raw().URL.Query()
|
||||
q.Add("api-version", "2017-09-01")
|
||||
q.Add("resource", strings.Join(scopes, " "))
|
||||
q.Add("clientid", os.Getenv(defaultIdentityClientID))
|
||||
if id != nil {
|
||||
if id.idKind() == miResourceID {
|
||||
log.Write(EventAuthentication, "WARNING: Azure ML doesn't support specifying a managed identity by resource ID")
|
||||
q.Set("clientid", "")
|
||||
q.Set(qpResID, id.String())
|
||||
} else {
|
||||
q.Set("clientid", id.String())
|
||||
}
|
||||
}
|
||||
request.Raw().URL.RawQuery = q.Encode()
|
||||
return request, nil
|
||||
}
|
||||
|
||||
func (c *managedIdentityClient) createServiceFabricAuthRequest(ctx context.Context, id ManagedIDKind, scopes []string) (*policy.Request, error) {
|
||||
request, err := runtime.NewRequest(ctx, http.MethodGet, c.endpoint)
|
||||
if err != nil {
|
||||
|
|
@ -330,7 +372,7 @@ func (c *managedIdentityClient) getAzureArcSecretKey(ctx context.Context, resour
|
|||
q.Add("resource", strings.Join(resources, " "))
|
||||
request.Raw().URL.RawQuery = q.Encode()
|
||||
// send the initial request to get the short-lived secret key
|
||||
response, err := c.pipeline.Do(request)
|
||||
response, err := c.azClient.Pipeline().Do(request)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
|
|||
20
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_credential.go
generated
vendored
20
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_credential.go
generated
vendored
|
|
@ -13,6 +13,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
|
||||
)
|
||||
|
||||
|
|
@ -67,8 +68,8 @@ type ManagedIdentityCredentialOptions struct {
|
|||
|
||||
// ManagedIdentityCredential authenticates an Azure managed identity in any hosting environment supporting managed identities.
|
||||
// This credential authenticates a system-assigned identity by default. Use ManagedIdentityCredentialOptions.ID to specify a
|
||||
// user-assigned identity. See Azure Active Directory documentation for more information about managed identities:
|
||||
// https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview
|
||||
// user-assigned identity. See Microsoft Entra ID documentation for more information about managed identities:
|
||||
// https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview
|
||||
type ManagedIdentityCredential struct {
|
||||
client *confidentialClient
|
||||
mic *managedIdentityClient
|
||||
|
|
@ -92,7 +93,9 @@ func NewManagedIdentityCredential(options *ManagedIdentityCredentialOptions) (*M
|
|||
clientID = options.ID.String()
|
||||
}
|
||||
// similarly, it's okay to give MSAL an incorrect tenant because MSAL won't use the value
|
||||
c, err := newConfidentialClient("common", clientID, credNameManagedIdentity, cred, confidentialClientOptions{})
|
||||
c, err := newConfidentialClient("common", clientID, credNameManagedIdentity, cred, confidentialClientOptions{
|
||||
ClientOptions: options.ClientOptions,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -101,13 +104,18 @@ func NewManagedIdentityCredential(options *ManagedIdentityCredentialOptions) (*M
|
|||
|
||||
// GetToken requests an access token from the hosting environment. This method is called automatically by Azure SDK clients.
|
||||
func (c *ManagedIdentityCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameManagedIdentity+"."+traceOpGetToken, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
|
||||
if len(opts.Scopes) != 1 {
|
||||
err := fmt.Errorf("%s.GetToken() requires exactly one scope", credNameManagedIdentity)
|
||||
err = fmt.Errorf("%s.GetToken() requires exactly one scope", credNameManagedIdentity)
|
||||
return azcore.AccessToken{}, err
|
||||
}
|
||||
// managed identity endpoints require an AADv1 resource (i.e. token audience), not a v2 scope, so we remove "/.default" here
|
||||
// managed identity endpoints require a Microsoft Entra ID v1 resource (i.e. token audience), not a v2 scope, so we remove "/.default" here
|
||||
opts.Scopes = []string{strings.TrimSuffix(opts.Scopes[0], defaultSuffix)}
|
||||
return c.client.GetToken(ctx, opts)
|
||||
tk, err := c.client.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
var _ azcore.TokenCredential = (*ManagedIdentityCredential)(nil)
|
||||
|
|
|
|||
17
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/on_behalf_of_credential.go
generated
vendored
17
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/on_behalf_of_credential.go
generated
vendored
|
|
@ -13,6 +13,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
|
||||
)
|
||||
|
||||
|
|
@ -21,9 +22,9 @@ const credNameOBO = "OnBehalfOfCredential"
|
|||
// OnBehalfOfCredential authenticates a service principal via the on-behalf-of flow. This is typically used by
|
||||
// middle-tier services that authorize requests to other services with a delegated user identity. Because this
|
||||
// is not an interactive authentication flow, an application using it must have admin consent for any delegated
|
||||
// permissions before requesting tokens for them. See [Azure Active Directory documentation] for more details.
|
||||
// permissions before requesting tokens for them. See [Microsoft Entra ID documentation] for more details.
|
||||
//
|
||||
// [Azure Active Directory documentation]: https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow
|
||||
// [Microsoft Entra ID documentation]: https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow
|
||||
type OnBehalfOfCredential struct {
|
||||
client *confidentialClient
|
||||
}
|
||||
|
|
@ -36,11 +37,13 @@ type OnBehalfOfCredentialOptions struct {
|
|||
// Add the wildcard value "*" to allow the credential to acquire tokens for any tenant in which the
|
||||
// application is registered.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
||||
// SendCertificateChain applies only when the credential is configured to authenticate with a certificate.
|
||||
// This setting controls whether the credential sends the public certificate chain in the x5c header of each
|
||||
// token request's JWT. This is required for, and only used in, Subject Name/Issuer (SNI) authentication.
|
||||
|
|
@ -84,9 +87,13 @@ func newOnBehalfOfCredential(tenantID, clientID, userAssertion string, cred conf
|
|||
return &OnBehalfOfCredential{c}, nil
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. This method is called automatically by Azure SDK clients.
|
||||
// GetToken requests an access token from Microsoft Entra ID. This method is called automatically by Azure SDK clients.
|
||||
func (o *OnBehalfOfCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return o.client.GetToken(ctx, opts)
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameOBO+"."+traceOpGetToken, o.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := o.client.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
var _ azcore.TokenCredential = (*OnBehalfOfCredential)(nil)
|
||||
|
|
|
|||
133
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/public_client.go
generated
vendored
133
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/public_client.go
generated
vendored
|
|
@ -8,38 +8,52 @@ package azidentity
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/internal/log"
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/public"
|
||||
|
||||
// this import ensures well-known configurations in azcore/cloud have ARM audiences for Authenticate()
|
||||
_ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime"
|
||||
)
|
||||
|
||||
type publicClientOptions struct {
|
||||
azcore.ClientOptions
|
||||
|
||||
AdditionallyAllowedTenants []string
|
||||
DeviceCodePrompt func(context.Context, DeviceCodeMessage) error
|
||||
DisableInstanceDiscovery bool
|
||||
LoginHint, RedirectURL string
|
||||
Username, Password string
|
||||
AdditionallyAllowedTenants []string
|
||||
DeviceCodePrompt func(context.Context, DeviceCodeMessage) error
|
||||
DisableAutomaticAuthentication bool
|
||||
DisableInstanceDiscovery bool
|
||||
LoginHint, RedirectURL string
|
||||
Record authenticationRecord
|
||||
TokenCachePersistenceOptions *tokenCachePersistenceOptions
|
||||
Username, Password string
|
||||
}
|
||||
|
||||
// publicClient wraps the MSAL public client
|
||||
type publicClient struct {
|
||||
account public.Account
|
||||
cae, noCAE msalPublicClient
|
||||
caeMu, noCAEMu, clientMu *sync.Mutex
|
||||
clientID, tenantID string
|
||||
defaultScope []string
|
||||
host string
|
||||
name string
|
||||
opts publicClientOptions
|
||||
record authenticationRecord
|
||||
azClient *azcore.Client
|
||||
}
|
||||
|
||||
var errScopeRequired = errors.New("authenticating in this environment requires specifying a scope in TokenRequestOptions")
|
||||
|
||||
func newPublicClient(tenantID, clientID, name string, o publicClientOptions) (*publicClient, error) {
|
||||
if !validTenantID(tenantID) {
|
||||
return nil, errInvalidTenantID
|
||||
|
|
@ -48,19 +62,76 @@ func newPublicClient(tenantID, clientID, name string, o publicClientOptions) (*p
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// if the application specified a cloud configuration, use its ARM audience as the default scope for Authenticate()
|
||||
audience := o.Cloud.Services[cloud.ResourceManager].Audience
|
||||
if audience == "" {
|
||||
// no cloud configuration, or no ARM audience, specified; try to map the host to a well-known one (all of which have a trailing slash)
|
||||
if !strings.HasSuffix(host, "/") {
|
||||
host += "/"
|
||||
}
|
||||
switch host {
|
||||
case cloud.AzureChina.ActiveDirectoryAuthorityHost:
|
||||
audience = cloud.AzureChina.Services[cloud.ResourceManager].Audience
|
||||
case cloud.AzureGovernment.ActiveDirectoryAuthorityHost:
|
||||
audience = cloud.AzureGovernment.Services[cloud.ResourceManager].Audience
|
||||
case cloud.AzurePublic.ActiveDirectoryAuthorityHost:
|
||||
audience = cloud.AzurePublic.Services[cloud.ResourceManager].Audience
|
||||
}
|
||||
}
|
||||
// if we didn't come up with an audience, the application will have to specify a scope for Authenticate()
|
||||
var defaultScope []string
|
||||
if audience != "" {
|
||||
defaultScope = []string{audience + defaultSuffix}
|
||||
}
|
||||
client, err := azcore.NewClient(module, version, runtime.PipelineOptions{
|
||||
Tracing: runtime.TracingOptions{
|
||||
Namespace: traceNamespace,
|
||||
},
|
||||
}, &o.ClientOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
o.AdditionallyAllowedTenants = resolveAdditionalTenants(o.AdditionallyAllowedTenants)
|
||||
return &publicClient{
|
||||
caeMu: &sync.Mutex{},
|
||||
clientID: clientID,
|
||||
clientMu: &sync.Mutex{},
|
||||
host: host,
|
||||
name: name,
|
||||
noCAEMu: &sync.Mutex{},
|
||||
opts: o,
|
||||
tenantID: tenantID,
|
||||
caeMu: &sync.Mutex{},
|
||||
clientID: clientID,
|
||||
clientMu: &sync.Mutex{},
|
||||
defaultScope: defaultScope,
|
||||
host: host,
|
||||
name: name,
|
||||
noCAEMu: &sync.Mutex{},
|
||||
opts: o,
|
||||
record: o.Record,
|
||||
tenantID: tenantID,
|
||||
azClient: client,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (p *publicClient) Authenticate(ctx context.Context, tro *policy.TokenRequestOptions) (authenticationRecord, error) {
|
||||
if tro == nil {
|
||||
tro = &policy.TokenRequestOptions{}
|
||||
}
|
||||
if len(tro.Scopes) == 0 {
|
||||
if p.defaultScope == nil {
|
||||
return authenticationRecord{}, errScopeRequired
|
||||
}
|
||||
tro.Scopes = p.defaultScope
|
||||
}
|
||||
client, mu, err := p.client(*tro)
|
||||
if err != nil {
|
||||
return authenticationRecord{}, err
|
||||
}
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
_, err = p.reqToken(ctx, client, *tro)
|
||||
if err == nil {
|
||||
scope := strings.Join(tro.Scopes, ", ")
|
||||
msg := fmt.Sprintf("%s.Authenticate() acquired a token for scope %q", p.name, scope)
|
||||
log.Write(EventAuthentication, msg)
|
||||
}
|
||||
return p.record, err
|
||||
}
|
||||
|
||||
// GetToken requests an access token from MSAL, checking the cache first.
|
||||
func (p *publicClient) GetToken(ctx context.Context, tro policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
if len(tro.Scopes) < 1 {
|
||||
|
|
@ -76,10 +147,13 @@ func (p *publicClient) GetToken(ctx context.Context, tro policy.TokenRequestOpti
|
|||
}
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
ar, err := client.AcquireTokenSilent(ctx, tro.Scopes, public.WithSilentAccount(p.account), public.WithClaims(tro.Claims), public.WithTenantID(tenant))
|
||||
ar, err := client.AcquireTokenSilent(ctx, tro.Scopes, public.WithSilentAccount(p.record.account()), public.WithClaims(tro.Claims), public.WithTenantID(tenant))
|
||||
if err == nil {
|
||||
return p.token(ar, err)
|
||||
}
|
||||
if p.opts.DisableAutomaticAuthentication {
|
||||
return azcore.AccessToken{}, errAuthenticationRequired
|
||||
}
|
||||
at, err := p.reqToken(ctx, client, tro)
|
||||
if err == nil {
|
||||
msg := fmt.Sprintf("%s.GetToken() acquired a token for scope %q", p.name, strings.Join(ar.GrantedScopes, ", "))
|
||||
|
|
@ -148,9 +222,14 @@ func (p *publicClient) client(tro policy.TokenRequestOptions) (msalPublicClient,
|
|||
}
|
||||
|
||||
func (p *publicClient) newMSALClient(enableCAE bool) (msalPublicClient, error) {
|
||||
cache, err := internal.NewCache(p.opts.TokenCachePersistenceOptions, enableCAE)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
o := []public.Option{
|
||||
public.WithAuthority(runtime.JoinPaths(p.host, p.tenantID)),
|
||||
public.WithHTTPClient(newPipelineAdapter(&p.opts.ClientOptions)),
|
||||
public.WithCache(cache),
|
||||
public.WithHTTPClient(p),
|
||||
}
|
||||
if enableCAE {
|
||||
o = append(o, public.WithClientCapabilities(cp1))
|
||||
|
|
@ -163,7 +242,7 @@ func (p *publicClient) newMSALClient(enableCAE bool) (msalPublicClient, error) {
|
|||
|
||||
func (p *publicClient) token(ar public.AuthResult, err error) (azcore.AccessToken, error) {
|
||||
if err == nil {
|
||||
p.account = ar.Account
|
||||
p.record, err = newAuthenticationRecord(ar)
|
||||
} else {
|
||||
res := getResponseFromError(err)
|
||||
err = newAuthenticationFailedError(p.name, err.Error(), res, err)
|
||||
|
|
@ -171,8 +250,24 @@ func (p *publicClient) token(ar public.AuthResult, err error) (azcore.AccessToke
|
|||
return azcore.AccessToken{Token: ar.AccessToken, ExpiresOn: ar.ExpiresOn.UTC()}, err
|
||||
}
|
||||
|
||||
// resolveTenant returns the correct tenant for a token request given the client's
|
||||
// resolveTenant returns the correct WithTenantID() argument for a token request given the client's
|
||||
// configuration, or an error when that configuration doesn't allow the specified tenant
|
||||
func (p *publicClient) resolveTenant(specified string) (string, error) {
|
||||
return resolveTenant(p.tenantID, specified, p.name, p.opts.AdditionallyAllowedTenants)
|
||||
t, err := resolveTenant(p.tenantID, specified, p.name, p.opts.AdditionallyAllowedTenants)
|
||||
if t == p.tenantID {
|
||||
// callers pass this value to MSAL's WithTenantID(). There's no need to redundantly specify
|
||||
// the client's default tenant and doing so is an error when that tenant is "organizations"
|
||||
t = ""
|
||||
}
|
||||
return t, err
|
||||
}
|
||||
|
||||
// these methods satisfy the MSAL ops.HTTPClient interface
|
||||
|
||||
func (p *publicClient) CloseIdleConnections() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
func (p *publicClient) Do(r *http.Request) (*http.Response, error) {
|
||||
return doForClient(p.azClient, r)
|
||||
}
|
||||
|
|
|
|||
40
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/username_password_credential.go
generated
vendored
40
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/username_password_credential.go
generated
vendored
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
)
|
||||
|
||||
const credNameUserPassword = "UsernamePasswordCredential"
|
||||
|
|
@ -23,11 +24,19 @@ type UsernamePasswordCredentialOptions struct {
|
|||
// Add the wildcard value "*" to allow the credential to acquire tokens for any tenant in which the
|
||||
// application is registered.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// authenticationRecord returned by a call to a credential's Authenticate method. Set this option
|
||||
// to enable the credential to use data from a previous authentication.
|
||||
authenticationRecord authenticationRecord
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
||||
// tokenCachePersistenceOptions enables persistent token caching when not nil.
|
||||
tokenCachePersistenceOptions *tokenCachePersistenceOptions
|
||||
}
|
||||
|
||||
// UsernamePasswordCredential authenticates a user with a password. Microsoft doesn't recommend this kind of authentication,
|
||||
|
|
@ -45,11 +54,13 @@ func NewUsernamePasswordCredential(tenantID string, clientID string, username st
|
|||
options = &UsernamePasswordCredentialOptions{}
|
||||
}
|
||||
opts := publicClientOptions{
|
||||
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
|
||||
ClientOptions: options.ClientOptions,
|
||||
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
|
||||
Password: password,
|
||||
Username: username,
|
||||
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
|
||||
ClientOptions: options.ClientOptions,
|
||||
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
|
||||
Password: password,
|
||||
Record: options.authenticationRecord,
|
||||
TokenCachePersistenceOptions: options.tokenCachePersistenceOptions,
|
||||
Username: username,
|
||||
}
|
||||
c, err := newPublicClient(tenantID, clientID, credNameUserPassword, opts)
|
||||
if err != nil {
|
||||
|
|
@ -58,9 +69,22 @@ func NewUsernamePasswordCredential(tenantID string, clientID string, username st
|
|||
return &UsernamePasswordCredential{client: c}, err
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. This method is called automatically by Azure SDK clients.
|
||||
// Authenticate the user. Subsequent calls to GetToken will automatically use the returned AuthenticationRecord.
|
||||
func (c *UsernamePasswordCredential) authenticate(ctx context.Context, opts *policy.TokenRequestOptions) (authenticationRecord, error) {
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameUserPassword+"."+traceOpAuthenticate, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.Authenticate(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Microsoft Entra ID. This method is called automatically by Azure SDK clients.
|
||||
func (c *UsernamePasswordCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return c.client.GetToken(ctx, opts)
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameUserPassword+"."+traceOpGetToken, c.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := c.client.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
var _ azcore.TokenCredential = (*UsernamePasswordCredential)(nil)
|
||||
|
|
|
|||
5
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
generated
vendored
5
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
generated
vendored
|
|
@ -10,6 +10,9 @@ const (
|
|||
// UserAgent is the string to be used in the user agent string when making requests.
|
||||
component = "azidentity"
|
||||
|
||||
// module is the fully qualified name of the module used in telemetry and distributed tracing.
|
||||
module = "github.com/Azure/azure-sdk-for-go/sdk/" + component
|
||||
|
||||
// Version is the semantic version (see http://semver.org) of this module.
|
||||
version = "v1.4.0"
|
||||
version = "v1.5.1"
|
||||
)
|
||||
|
|
|
|||
11
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/workload_identity.go
generated
vendored
11
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/workload_identity.go
generated
vendored
|
|
@ -15,6 +15,7 @@ import (
|
|||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
|
||||
)
|
||||
|
||||
const credNameWorkloadIdentity = "WorkloadIdentityCredential"
|
||||
|
|
@ -41,7 +42,7 @@ type WorkloadIdentityCredentialOptions struct {
|
|||
// ClientID of the service principal. Defaults to the value of the environment variable AZURE_CLIENT_ID.
|
||||
ClientID string
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Azure AD instance metadata
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
|
@ -93,9 +94,13 @@ func NewWorkloadIdentityCredential(options *WorkloadIdentityCredentialOptions) (
|
|||
return &w, nil
|
||||
}
|
||||
|
||||
// GetToken requests an access token from Azure Active Directory. Azure SDK clients call this method automatically.
|
||||
// GetToken requests an access token from Microsoft Entra ID. Azure SDK clients call this method automatically.
|
||||
func (w *WorkloadIdentityCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
|
||||
return w.cred.GetToken(ctx, opts)
|
||||
var err error
|
||||
ctx, endSpan := runtime.StartSpan(ctx, credNameWorkloadIdentity+"."+traceOpGetToken, w.cred.client.azClient.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
tk, err := w.cred.GetToken(ctx, opts)
|
||||
return tk, err
|
||||
}
|
||||
|
||||
// getAssertion returns the specified file's content, which is expected to be a Kubernetes service account token.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,72 @@
|
|||
# Release History
|
||||
|
||||
## 5.5.0 (2024-01-26)
|
||||
### Features Added
|
||||
|
||||
- New value `DiskSecurityTypesConfidentialVMNonPersistedTPM` added to enum type `DiskSecurityTypes`
|
||||
- New enum type `ProvisionedBandwidthCopyOption` with values `ProvisionedBandwidthCopyOptionEnhanced`, `ProvisionedBandwidthCopyOptionNone`
|
||||
- New field `ProvisionedBandwidthCopySpeed` in struct `CreationData`
|
||||
|
||||
|
||||
## 5.4.0 (2023-12-22)
|
||||
### Features Added
|
||||
|
||||
- New value `ConfidentialVMEncryptionTypeNonPersistedTPM` added to enum type `ConfidentialVMEncryptionType`
|
||||
- New value `ReplicationStatusTypesUefiSettings` added to enum type `ReplicationStatusTypes`
|
||||
- New value `SecurityEncryptionTypesNonPersistedTPM` added to enum type `SecurityEncryptionTypes`
|
||||
- New enum type `Mode` with values `ModeAudit`, `ModeEnforce`
|
||||
- New enum type `SSHEncryptionTypes` with values `SSHEncryptionTypesEd25519`, `SSHEncryptionTypesRSA`
|
||||
- New enum type `UefiKeyType` with values `UefiKeyTypeSHA256`, `UefiKeyTypeX509`
|
||||
- New enum type `UefiSignatureTemplateName` with values `UefiSignatureTemplateNameMicrosoftUefiCertificateAuthorityTemplate`, `UefiSignatureTemplateNameMicrosoftWindowsTemplate`, `UefiSignatureTemplateNameNoSignatureTemplate`
|
||||
- New function `*DedicatedHostsClient.BeginRedeploy(context.Context, string, string, string, *DedicatedHostsClientBeginRedeployOptions) (*runtime.Poller[DedicatedHostsClientRedeployResponse], error)`
|
||||
- New function `*VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade(context.Context, string, string, string, *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse], error)`
|
||||
- New function `*VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks(context.Context, string, string, string, AttachDetachDataDisksRequest, *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse], error)`
|
||||
- New function `*VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade(context.Context, string, string, *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetsClientApproveRollingUpgradeResponse], error)`
|
||||
- New function `*VirtualMachinesClient.BeginAttachDetachDataDisks(context.Context, string, string, AttachDetachDataDisksRequest, *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*runtime.Poller[VirtualMachinesClientAttachDetachDataDisksResponse], error)`
|
||||
- New struct `AttachDetachDataDisksRequest`
|
||||
- New struct `CommunityGalleryMetadata`
|
||||
- New struct `CommunityGalleryProperties`
|
||||
- New struct `DataDisksToAttach`
|
||||
- New struct `DataDisksToDetach`
|
||||
- New struct `EncryptionIdentity`
|
||||
- New struct `GalleryImageVersionUefiSettings`
|
||||
- New struct `ImageVersionSecurityProfile`
|
||||
- New struct `ProxyAgentSettings`
|
||||
- New struct `ResiliencyPolicy`
|
||||
- New struct `ResilientVMCreationPolicy`
|
||||
- New struct `ResilientVMDeletionPolicy`
|
||||
- New struct `ResourceSharingProfile`
|
||||
- New struct `SSHGenerateKeyPairInputParameters`
|
||||
- New struct `SharedGalleryProperties`
|
||||
- New struct `UefiKey`
|
||||
- New struct `UefiKeySignatures`
|
||||
- New field `OSRollingUpgradeDeferral` in struct `AutomaticOSUpgradePolicy`
|
||||
- New field `SharedSubscriptionIDs` in struct `CapacityReservationGroupInstanceView`
|
||||
- New field `SharingProfile` in struct `CapacityReservationGroupProperties`
|
||||
- New field `Properties` in struct `CommunityGallery`
|
||||
- New field `ArtifactTags`, `Disclaimer` in struct `CommunityGalleryImageProperties`
|
||||
- New field `ArtifactTags`, `Disclaimer` in struct `CommunityGalleryImageVersionProperties`
|
||||
- New field `SecurityProfile` in struct `GalleryImageVersionProperties`
|
||||
- New field `DiskControllerType` in struct `RestorePointSourceVMStorageProfile`
|
||||
- New field `Parameters` in struct `SSHPublicKeysClientGenerateKeyPairOptions`
|
||||
- New field `EncryptionIdentity`, `ProxyAgentSettings` in struct `SecurityProfile`
|
||||
- New field `Properties` in struct `SharedGallery`
|
||||
- New field `ArtifactTags` in struct `SharedGalleryImageProperties`
|
||||
- New field `ArtifactTags` in struct `SharedGalleryImageVersionProperties`
|
||||
- New field `Etag`, `ManagedBy` in struct `VirtualMachine`
|
||||
- New field `IsVMInStandbyPool` in struct `VirtualMachineInstanceView`
|
||||
- New field `Etag` in struct `VirtualMachineScaleSet`
|
||||
- New field `ResiliencyPolicy` in struct `VirtualMachineScaleSetProperties`
|
||||
- New field `ResiliencyPolicy` in struct `VirtualMachineScaleSetUpdateProperties`
|
||||
- New field `Etag` in struct `VirtualMachineScaleSetVM`
|
||||
- New field `TimeCreated` in struct `VirtualMachineScaleSetVMProfile`
|
||||
- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachineScaleSetVMsClientBeginUpdateOptions`
|
||||
- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions`
|
||||
- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachineScaleSetsClientBeginUpdateOptions`
|
||||
- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachinesClientBeginCreateOrUpdateOptions`
|
||||
- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachinesClientBeginUpdateOptions`
|
||||
|
||||
|
||||
## 5.3.0 (2023-11-24)
|
||||
### Features Added
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Azure Compute Module for Go
|
||||
|
||||
[](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4)
|
||||
[](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5)
|
||||
|
||||
The `armcompute` module provides operations for working with Azure Compute.
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for ve
|
|||
Install the Azure Compute module:
|
||||
|
||||
```sh
|
||||
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4
|
||||
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5
|
||||
```
|
||||
|
||||
## Authorization
|
||||
|
|
@ -57,7 +57,7 @@ clientFactory, err := armcompute.NewClientFactory(<subscription ID>, cred, &opti
|
|||
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.
|
||||
|
||||
```go
|
||||
client := clientFactory.NewLogAnalyticsClient()
|
||||
client := clientFactory.NewAvailabilitySetsClient()
|
||||
```
|
||||
|
||||
## Fakes
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "go",
|
||||
"TagPrefix": "go/resourcemanager/compute/armcompute",
|
||||
"Tag": "go/resourcemanager/compute/armcompute_367222fc88"
|
||||
"Tag": "go/resourcemanager/compute/armcompute_444bc7d3bc"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
``` yaml
|
||||
azure-arm: true
|
||||
require:
|
||||
- https://github.com/Azure/azure-rest-api-specs/blob/c78b5d8bd3aff2d82a5f034d9164b1a9ac030e09/specification/compute/resource-manager/readme.md
|
||||
- https://github.com/Azure/azure-rest-api-specs/blob/c78b5d8bd3aff2d82a5f034d9164b1a9ac030e09/specification/compute/resource-manager/readme.go.md
|
||||
- https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/compute/resource-manager/readme.md
|
||||
- https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/compute/resource-manager/readme.go.md
|
||||
license-header: MICROSOFT_MIT_NO_VERSION
|
||||
module-version: 5.3.0
|
||||
tag: package-2023-07-01
|
||||
module-version: 5.5.0
|
||||
tag: package-2023-10-02
|
||||
```
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewAvailabilitySetsClient(subscriptionID string, credential azcore.TokenCre
|
|||
// CreateOrUpdate - Create or update an availability set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - availabilitySetName - The name of the availability set.
|
||||
// - parameters - Parameters supplied to the Create Availability Set operation.
|
||||
|
|
@ -95,7 +95,7 @@ func (client *AvailabilitySetsClient) createOrUpdateCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -116,7 +116,7 @@ func (client *AvailabilitySetsClient) createOrUpdateHandleResponse(resp *http.Re
|
|||
// Delete - Delete an availability set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - availabilitySetName - The name of the availability set.
|
||||
// - options - AvailabilitySetsClientDeleteOptions contains the optional parameters for the AvailabilitySetsClient.Delete method.
|
||||
|
|
@ -161,7 +161,7 @@ func (client *AvailabilitySetsClient) deleteCreateRequest(ctx context.Context, r
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -170,7 +170,7 @@ func (client *AvailabilitySetsClient) deleteCreateRequest(ctx context.Context, r
|
|||
// Get - Retrieves information about an availability set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - availabilitySetName - The name of the availability set.
|
||||
// - options - AvailabilitySetsClientGetOptions contains the optional parameters for the AvailabilitySetsClient.Get method.
|
||||
|
|
@ -216,7 +216,7 @@ func (client *AvailabilitySetsClient) getCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -233,7 +233,7 @@ func (client *AvailabilitySetsClient) getHandleResponse(resp *http.Response) (Av
|
|||
|
||||
// NewListPager - Lists all availability sets in a resource group.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - AvailabilitySetsClientListOptions contains the optional parameters for the AvailabilitySetsClient.NewListPager
|
||||
// method.
|
||||
|
|
@ -276,7 +276,7 @@ func (client *AvailabilitySetsClient) listCreateRequest(ctx context.Context, res
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -294,7 +294,7 @@ func (client *AvailabilitySetsClient) listHandleResponse(resp *http.Response) (A
|
|||
// NewListAvailableSizesPager - Lists all available virtual machine sizes that can be used to create a new virtual machine
|
||||
// in an existing availability set.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - availabilitySetName - The name of the availability set.
|
||||
// - options - AvailabilitySetsClientListAvailableSizesOptions contains the optional parameters for the AvailabilitySetsClient.NewListAvailableSizesPager
|
||||
|
|
@ -343,7 +343,7 @@ func (client *AvailabilitySetsClient) listAvailableSizesCreateRequest(ctx contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -360,7 +360,7 @@ func (client *AvailabilitySetsClient) listAvailableSizesHandleResponse(resp *htt
|
|||
|
||||
// NewListBySubscriptionPager - Lists all availability sets in a subscription.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - AvailabilitySetsClientListBySubscriptionOptions contains the optional parameters for the AvailabilitySetsClient.NewListBySubscriptionPager
|
||||
// method.
|
||||
func (client *AvailabilitySetsClient) NewListBySubscriptionPager(options *AvailabilitySetsClientListBySubscriptionOptions) *runtime.Pager[AvailabilitySetsClientListBySubscriptionResponse] {
|
||||
|
|
@ -398,7 +398,7 @@ func (client *AvailabilitySetsClient) listBySubscriptionCreateRequest(ctx contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
|
|
@ -419,7 +419,7 @@ func (client *AvailabilitySetsClient) listBySubscriptionHandleResponse(resp *htt
|
|||
// Update - Update an availability set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - availabilitySetName - The name of the availability set.
|
||||
// - parameters - Parameters supplied to the Update Availability Set operation.
|
||||
|
|
@ -466,7 +466,7 @@ func (client *AvailabilitySetsClient) updateCreateRequest(ctx context.Context, r
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@ func NewCapacityReservationGroupsClient(subscriptionID string, credential azcore
|
|||
}
|
||||
|
||||
// CreateOrUpdate - The operation to create or update a capacity reservation group. When updating a capacity reservation group,
|
||||
// only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more
|
||||
// details.
|
||||
// only tags and sharing profile may be modified. Please refer to
|
||||
// https://aka.ms/CapacityReservation for more details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - parameters - Parameters supplied to the Create capacity reservation Group.
|
||||
|
|
@ -97,7 +97,7 @@ func (client *CapacityReservationGroupsClient) createOrUpdateCreateRequest(ctx c
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -120,7 +120,7 @@ func (client *CapacityReservationGroupsClient) createOrUpdateHandleResponse(resp
|
|||
// the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - options - CapacityReservationGroupsClientDeleteOptions contains the optional parameters for the CapacityReservationGroupsClient.Delete
|
||||
|
|
@ -166,7 +166,7 @@ func (client *CapacityReservationGroupsClient) deleteCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -175,7 +175,7 @@ func (client *CapacityReservationGroupsClient) deleteCreateRequest(ctx context.C
|
|||
// Get - The operation that retrieves information about a capacity reservation group.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - options - CapacityReservationGroupsClientGetOptions contains the optional parameters for the CapacityReservationGroupsClient.Get
|
||||
|
|
@ -225,7 +225,7 @@ func (client *CapacityReservationGroupsClient) getCreateRequest(ctx context.Cont
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -243,7 +243,7 @@ func (client *CapacityReservationGroupsClient) getHandleResponse(resp *http.Resp
|
|||
// NewListByResourceGroupPager - Lists all of the capacity reservation groups in the specified resource group. Use the nextLink
|
||||
// property in the response to get the next page of capacity reservation groups.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - CapacityReservationGroupsClientListByResourceGroupOptions contains the optional parameters for the CapacityReservationGroupsClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -286,7 +286,7 @@ func (client *CapacityReservationGroupsClient) listByResourceGroupCreateRequest(
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
|
|
@ -307,7 +307,7 @@ func (client *CapacityReservationGroupsClient) listByResourceGroupHandleResponse
|
|||
// NewListBySubscriptionPager - Lists all of the capacity reservation groups in the subscription. Use the nextLink property
|
||||
// in the response to get the next page of capacity reservation groups.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - CapacityReservationGroupsClientListBySubscriptionOptions contains the optional parameters for the CapacityReservationGroupsClient.NewListBySubscriptionPager
|
||||
// method.
|
||||
func (client *CapacityReservationGroupsClient) NewListBySubscriptionPager(options *CapacityReservationGroupsClientListBySubscriptionOptions) *runtime.Pager[CapacityReservationGroupsClientListBySubscriptionResponse] {
|
||||
|
|
@ -345,7 +345,7 @@ func (client *CapacityReservationGroupsClient) listBySubscriptionCreateRequest(c
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
|
|
@ -363,11 +363,11 @@ func (client *CapacityReservationGroupsClient) listBySubscriptionHandleResponse(
|
|||
return result, nil
|
||||
}
|
||||
|
||||
// Update - The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may
|
||||
// be modified.
|
||||
// Update - The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and
|
||||
// sharing profile may be modified.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - parameters - Parameters supplied to the Update capacity reservation Group operation.
|
||||
|
|
@ -415,7 +415,7 @@ func (client *CapacityReservationGroupsClient) updateCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func NewCapacityReservationsClient(subscriptionID string, credential azcore.Toke
|
|||
// details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - capacityReservationName - The name of the capacity reservation.
|
||||
|
|
@ -78,7 +78,7 @@ func (client *CapacityReservationsClient) BeginCreateOrUpdate(ctx context.Contex
|
|||
// details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *CapacityReservationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation, options *CapacityReservationsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "CapacityReservationsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -124,7 +124,7 @@ func (client *CapacityReservationsClient) createOrUpdateCreateRequest(ctx contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -138,7 +138,7 @@ func (client *CapacityReservationsClient) createOrUpdateCreateRequest(ctx contex
|
|||
// https://aka.ms/CapacityReservation for more details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - capacityReservationName - The name of the capacity reservation.
|
||||
|
|
@ -166,7 +166,7 @@ func (client *CapacityReservationsClient) BeginDelete(ctx context.Context, resou
|
|||
// https://aka.ms/CapacityReservation for more details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *CapacityReservationsClient) deleteOperation(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "CapacityReservationsClient.BeginDelete"
|
||||
|
|
@ -212,7 +212,7 @@ func (client *CapacityReservationsClient) deleteCreateRequest(ctx context.Contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -221,7 +221,7 @@ func (client *CapacityReservationsClient) deleteCreateRequest(ctx context.Contex
|
|||
// Get - The operation that retrieves information about the capacity reservation.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - capacityReservationName - The name of the capacity reservation.
|
||||
|
|
@ -276,7 +276,7 @@ func (client *CapacityReservationsClient) getCreateRequest(ctx context.Context,
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -294,7 +294,7 @@ func (client *CapacityReservationsClient) getHandleResponse(resp *http.Response)
|
|||
// NewListByCapacityReservationGroupPager - Lists all of the capacity reservations in the specified capacity reservation group.
|
||||
// Use the nextLink property in the response to get the next page of capacity reservations.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - options - CapacityReservationsClientListByCapacityReservationGroupOptions contains the optional parameters for the CapacityReservationsClient.NewListByCapacityReservationGroupPager
|
||||
|
|
@ -342,7 +342,7 @@ func (client *CapacityReservationsClient) listByCapacityReservationGroupCreateRe
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -360,7 +360,7 @@ func (client *CapacityReservationsClient) listByCapacityReservationGroupHandleRe
|
|||
// BeginUpdate - The operation to update a capacity reservation.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - capacityReservationGroupName - The name of the capacity reservation group.
|
||||
// - capacityReservationName - The name of the capacity reservation.
|
||||
|
|
@ -387,7 +387,7 @@ func (client *CapacityReservationsClient) BeginUpdate(ctx context.Context, resou
|
|||
// Update - The operation to update a capacity reservation.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *CapacityReservationsClient) update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate, options *CapacityReservationsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "CapacityReservationsClient.BeginUpdate"
|
||||
|
|
@ -433,7 +433,7 @@ func (client *CapacityReservationsClient) updateCreateRequest(ctx context.Contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewCommunityGalleriesClient(subscriptionID string, credential azcore.TokenC
|
|||
// Get - Get a community gallery by gallery public name.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - publicGalleryName - The public name of the community gallery.
|
||||
// - options - CommunityGalleriesClientGetOptions contains the optional parameters for the CommunityGalleriesClient.Get method.
|
||||
|
|
@ -93,7 +93,7 @@ func (client *CommunityGalleriesClient) getCreateRequest(ctx context.Context, lo
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewCommunityGalleryImagesClient(subscriptionID string, credential azcore.To
|
|||
// Get - Get a community gallery image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - publicGalleryName - The public name of the community gallery.
|
||||
// - galleryImageName - The name of the community gallery image definition.
|
||||
|
|
@ -99,7 +99,7 @@ func (client *CommunityGalleryImagesClient) getCreateRequest(ctx context.Context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -116,7 +116,7 @@ func (client *CommunityGalleryImagesClient) getHandleResponse(resp *http.Respons
|
|||
|
||||
// NewListPager - List community gallery images inside a gallery.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - publicGalleryName - The public name of the community gallery.
|
||||
// - options - CommunityGalleryImagesClientListOptions contains the optional parameters for the CommunityGalleryImagesClient.NewListPager
|
||||
|
|
@ -164,7 +164,7 @@ func (client *CommunityGalleryImagesClient) listCreateRequest(ctx context.Contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewCommunityGalleryImageVersionsClient(subscriptionID string, credential az
|
|||
// Get - Get a community gallery image version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - publicGalleryName - The public name of the community gallery.
|
||||
// - galleryImageName - The name of the community gallery image definition.
|
||||
|
|
@ -106,7 +106,7 @@ func (client *CommunityGalleryImageVersionsClient) getCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -123,7 +123,7 @@ func (client *CommunityGalleryImageVersionsClient) getHandleResponse(resp *http.
|
|||
|
||||
// NewListPager - List community gallery image versions inside an image.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - publicGalleryName - The public name of the community gallery.
|
||||
// - galleryImageName - The name of the community gallery image definition.
|
||||
|
|
@ -176,7 +176,7 @@ func (client *CommunityGalleryImageVersionsClient) listCreateRequest(ctx context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ package armcompute
|
|||
|
||||
const (
|
||||
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
|
||||
moduleVersion = "v5.3.0"
|
||||
moduleVersion = "v5.5.0"
|
||||
)
|
||||
|
||||
type AccessLevel string
|
||||
|
|
@ -214,6 +214,7 @@ const (
|
|||
ConfidentialVMEncryptionTypeEncryptedVMGuestStateOnlyWithPmk ConfidentialVMEncryptionType = "EncryptedVMGuestStateOnlyWithPmk"
|
||||
ConfidentialVMEncryptionTypeEncryptedWithCmk ConfidentialVMEncryptionType = "EncryptedWithCmk"
|
||||
ConfidentialVMEncryptionTypeEncryptedWithPmk ConfidentialVMEncryptionType = "EncryptedWithPmk"
|
||||
ConfidentialVMEncryptionTypeNonPersistedTPM ConfidentialVMEncryptionType = "NonPersistedTPM"
|
||||
)
|
||||
|
||||
// PossibleConfidentialVMEncryptionTypeValues returns the possible values for the ConfidentialVMEncryptionType const type.
|
||||
|
|
@ -222,6 +223,7 @@ func PossibleConfidentialVMEncryptionTypeValues() []ConfidentialVMEncryptionType
|
|||
ConfidentialVMEncryptionTypeEncryptedVMGuestStateOnlyWithPmk,
|
||||
ConfidentialVMEncryptionTypeEncryptedWithCmk,
|
||||
ConfidentialVMEncryptionTypeEncryptedWithPmk,
|
||||
ConfidentialVMEncryptionTypeNonPersistedTPM,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -541,6 +543,9 @@ const (
|
|||
// DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey - Indicates Confidential VM disk with both OS disk and VM guest
|
||||
// state encrypted with a platform managed key
|
||||
DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey DiskSecurityTypes = "ConfidentialVM_DiskEncryptedWithPlatformKey"
|
||||
// DiskSecurityTypesConfidentialVMNonPersistedTPM - Indicates Confidential VM disk with a ephemeral vTPM. vTPM state is not
|
||||
// persisted across VM reboots.
|
||||
DiskSecurityTypesConfidentialVMNonPersistedTPM DiskSecurityTypes = "ConfidentialVM_NonPersistedTPM"
|
||||
// DiskSecurityTypesConfidentialVMVmguestStateOnlyEncryptedWithPlatformKey - Indicates Confidential VM disk with only VM guest
|
||||
// state encrypted
|
||||
DiskSecurityTypesConfidentialVMVmguestStateOnlyEncryptedWithPlatformKey DiskSecurityTypes = "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey"
|
||||
|
|
@ -554,6 +559,7 @@ func PossibleDiskSecurityTypesValues() []DiskSecurityTypes {
|
|||
return []DiskSecurityTypes{
|
||||
DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey,
|
||||
DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey,
|
||||
DiskSecurityTypesConfidentialVMNonPersistedTPM,
|
||||
DiskSecurityTypesConfidentialVMVmguestStateOnlyEncryptedWithPlatformKey,
|
||||
DiskSecurityTypesTrustedLaunch,
|
||||
}
|
||||
|
|
@ -899,11 +905,8 @@ func PossibleGalleryProvisioningStateValues() []GalleryProvisioningState {
|
|||
}
|
||||
}
|
||||
|
||||
// GallerySharingPermissionTypes - This property allows you to specify the permission of sharing gallery.
|
||||
// Possible values are:
|
||||
// Private
|
||||
// Groups
|
||||
// Community
|
||||
// GallerySharingPermissionTypes - This property allows you to specify the permission of sharing gallery. Possible values
|
||||
// are: Private, Groups, Community.
|
||||
type GallerySharingPermissionTypes string
|
||||
|
||||
const (
|
||||
|
|
@ -1155,6 +1158,24 @@ func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationR
|
|||
}
|
||||
}
|
||||
|
||||
// Mode - Specifies the mode that ProxyAgent will execute on if the feature is enabled. ProxyAgent will start to audit or
|
||||
// monitor but not enforce access control over requests to host endpoints in Audit mode,
|
||||
// while in Enforce mode it will enforce access control. The default value is Enforce mode.
|
||||
type Mode string
|
||||
|
||||
const (
|
||||
ModeAudit Mode = "Audit"
|
||||
ModeEnforce Mode = "Enforce"
|
||||
)
|
||||
|
||||
// PossibleModeValues returns the possible values for the Mode const type.
|
||||
func PossibleModeValues() []Mode {
|
||||
return []Mode{
|
||||
ModeAudit,
|
||||
ModeEnforce,
|
||||
}
|
||||
}
|
||||
|
||||
// NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network
|
||||
// Interface Configurations
|
||||
type NetworkAPIVersion string
|
||||
|
|
@ -1265,9 +1286,7 @@ func PossibleOperatingSystemTypeValues() []OperatingSystemType {
|
|||
}
|
||||
|
||||
// OperatingSystemTypes - This property allows you to specify the supported type of the OS that application is built for.
|
||||
// Possible values are:
|
||||
// Windows
|
||||
// Linux
|
||||
// Possible values are: Windows, Linux.
|
||||
type OperatingSystemTypes string
|
||||
|
||||
const (
|
||||
|
|
@ -1485,6 +1504,23 @@ func PossibleProtocolTypesValues() []ProtocolTypes {
|
|||
}
|
||||
}
|
||||
|
||||
// ProvisionedBandwidthCopyOption - If this field is set on a snapshot and createOption is CopyStart, the snapshot will be
|
||||
// copied at a quicker speed.
|
||||
type ProvisionedBandwidthCopyOption string
|
||||
|
||||
const (
|
||||
ProvisionedBandwidthCopyOptionEnhanced ProvisionedBandwidthCopyOption = "Enhanced"
|
||||
ProvisionedBandwidthCopyOptionNone ProvisionedBandwidthCopyOption = "None"
|
||||
)
|
||||
|
||||
// PossibleProvisionedBandwidthCopyOptionValues returns the possible values for the ProvisionedBandwidthCopyOption const type.
|
||||
func PossibleProvisionedBandwidthCopyOptionValues() []ProvisionedBandwidthCopyOption {
|
||||
return []ProvisionedBandwidthCopyOption{
|
||||
ProvisionedBandwidthCopyOptionEnhanced,
|
||||
ProvisionedBandwidthCopyOptionNone,
|
||||
}
|
||||
}
|
||||
|
||||
// ProximityPlacementGroupType - Specifies the type of the proximity placement group. Possible values are: Standard : Co-locate
|
||||
// resources within an Azure region or Availability Zone. Ultra : For future use.
|
||||
type ProximityPlacementGroupType string
|
||||
|
|
@ -1631,12 +1667,14 @@ type ReplicationStatusTypes string
|
|||
|
||||
const (
|
||||
ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus"
|
||||
ReplicationStatusTypesUefiSettings ReplicationStatusTypes = "UefiSettings"
|
||||
)
|
||||
|
||||
// PossibleReplicationStatusTypesValues returns the possible values for the ReplicationStatusTypes const type.
|
||||
func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes {
|
||||
return []ReplicationStatusTypes{
|
||||
ReplicationStatusTypesReplicationStatus,
|
||||
ReplicationStatusTypesUefiSettings,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1798,13 +1836,32 @@ func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode {
|
|||
}
|
||||
}
|
||||
|
||||
// SSHEncryptionTypes - The encryption type of the SSH keys to be generated. See SshEncryptionTypes for possible set of values.
|
||||
// If not provided, will default to RSA
|
||||
type SSHEncryptionTypes string
|
||||
|
||||
const (
|
||||
SSHEncryptionTypesEd25519 SSHEncryptionTypes = "Ed25519"
|
||||
SSHEncryptionTypesRSA SSHEncryptionTypes = "RSA"
|
||||
)
|
||||
|
||||
// PossibleSSHEncryptionTypesValues returns the possible values for the SSHEncryptionTypes const type.
|
||||
func PossibleSSHEncryptionTypesValues() []SSHEncryptionTypes {
|
||||
return []SSHEncryptionTypes{
|
||||
SSHEncryptionTypesEd25519,
|
||||
SSHEncryptionTypesRSA,
|
||||
}
|
||||
}
|
||||
|
||||
// SecurityEncryptionTypes - Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption
|
||||
// of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the
|
||||
// VMGuestState blob. Note: It can be set for only Confidential VMs.
|
||||
// of the managed disk along with VMGuestState blob, VMGuestStateOnly for encryption of just the
|
||||
// VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob.. Note: It can be set
|
||||
// for only Confidential VMs.
|
||||
type SecurityEncryptionTypes string
|
||||
|
||||
const (
|
||||
SecurityEncryptionTypesDiskWithVMGuestState SecurityEncryptionTypes = "DiskWithVMGuestState"
|
||||
SecurityEncryptionTypesNonPersistedTPM SecurityEncryptionTypes = "NonPersistedTPM"
|
||||
SecurityEncryptionTypesVMGuestStateOnly SecurityEncryptionTypes = "VMGuestStateOnly"
|
||||
)
|
||||
|
||||
|
|
@ -1812,6 +1869,7 @@ const (
|
|||
func PossibleSecurityEncryptionTypesValues() []SecurityEncryptionTypes {
|
||||
return []SecurityEncryptionTypes{
|
||||
SecurityEncryptionTypesDiskWithVMGuestState,
|
||||
SecurityEncryptionTypesNonPersistedTPM,
|
||||
SecurityEncryptionTypesVMGuestStateOnly,
|
||||
}
|
||||
}
|
||||
|
|
@ -1895,10 +1953,8 @@ func PossibleSharedToValuesValues() []SharedToValues {
|
|||
}
|
||||
}
|
||||
|
||||
// SharingProfileGroupTypes - This property allows you to specify the type of sharing group.
|
||||
// Possible values are:
|
||||
// Subscriptions
|
||||
// AADTenants
|
||||
// SharingProfileGroupTypes - This property allows you to specify the type of sharing group. Possible values are: Subscriptions,
|
||||
// AADTenants.
|
||||
type SharingProfileGroupTypes string
|
||||
|
||||
const (
|
||||
|
|
@ -1934,11 +1990,8 @@ func PossibleSharingStateValues() []SharingState {
|
|||
}
|
||||
}
|
||||
|
||||
// SharingUpdateOperationTypes - This property allows you to specify the operation type of gallery sharing update.
|
||||
// Possible values are:
|
||||
// Add
|
||||
// Remove
|
||||
// Reset
|
||||
// SharingUpdateOperationTypes - This property allows you to specify the operation type of gallery sharing update. Possible
|
||||
// values are: Add, Remove, Reset.
|
||||
type SharingUpdateOperationTypes string
|
||||
|
||||
const (
|
||||
|
|
@ -2047,6 +2100,40 @@ func PossibleStorageAccountTypesValues() []StorageAccountTypes {
|
|||
}
|
||||
}
|
||||
|
||||
// UefiKeyType - The type of key signature.
|
||||
type UefiKeyType string
|
||||
|
||||
const (
|
||||
UefiKeyTypeSHA256 UefiKeyType = "sha256"
|
||||
UefiKeyTypeX509 UefiKeyType = "x509"
|
||||
)
|
||||
|
||||
// PossibleUefiKeyTypeValues returns the possible values for the UefiKeyType const type.
|
||||
func PossibleUefiKeyTypeValues() []UefiKeyType {
|
||||
return []UefiKeyType{
|
||||
UefiKeyTypeSHA256,
|
||||
UefiKeyTypeX509,
|
||||
}
|
||||
}
|
||||
|
||||
// UefiSignatureTemplateName - The name of the signature template that contains default UEFI keys.
|
||||
type UefiSignatureTemplateName string
|
||||
|
||||
const (
|
||||
UefiSignatureTemplateNameMicrosoftUefiCertificateAuthorityTemplate UefiSignatureTemplateName = "MicrosoftUefiCertificateAuthorityTemplate"
|
||||
UefiSignatureTemplateNameMicrosoftWindowsTemplate UefiSignatureTemplateName = "MicrosoftWindowsTemplate"
|
||||
UefiSignatureTemplateNameNoSignatureTemplate UefiSignatureTemplateName = "NoSignatureTemplate"
|
||||
)
|
||||
|
||||
// PossibleUefiSignatureTemplateNameValues returns the possible values for the UefiSignatureTemplateName const type.
|
||||
func PossibleUefiSignatureTemplateNameValues() []UefiSignatureTemplateName {
|
||||
return []UefiSignatureTemplateName{
|
||||
UefiSignatureTemplateNameMicrosoftUefiCertificateAuthorityTemplate,
|
||||
UefiSignatureTemplateNameMicrosoftWindowsTemplate,
|
||||
UefiSignatureTemplateNameNoSignatureTemplate,
|
||||
}
|
||||
}
|
||||
|
||||
// UpgradeMode - Specifies the mode of an upgrade to virtual machines in the scale set.
|
||||
// Possible values are:
|
||||
// Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func NewDedicatedHostGroupsClient(subscriptionID string, credential azcore.Token
|
|||
// see Dedicated Host Documentation [https://go.microsoft.com/fwlink/?linkid=2082596]
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - parameters - Parameters supplied to the Create Dedicated Host Group.
|
||||
|
|
@ -96,7 +96,7 @@ func (client *DedicatedHostGroupsClient) createOrUpdateCreateRequest(ctx context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -117,7 +117,7 @@ func (client *DedicatedHostGroupsClient) createOrUpdateHandleResponse(resp *http
|
|||
// Delete - Delete a dedicated host group.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - options - DedicatedHostGroupsClientDeleteOptions contains the optional parameters for the DedicatedHostGroupsClient.Delete
|
||||
|
|
@ -163,7 +163,7 @@ func (client *DedicatedHostGroupsClient) deleteCreateRequest(ctx context.Context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -172,7 +172,7 @@ func (client *DedicatedHostGroupsClient) deleteCreateRequest(ctx context.Context
|
|||
// Get - Retrieves information about a dedicated host group.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - options - DedicatedHostGroupsClientGetOptions contains the optional parameters for the DedicatedHostGroupsClient.Get method.
|
||||
|
|
@ -221,7 +221,7 @@ func (client *DedicatedHostGroupsClient) getCreateRequest(ctx context.Context, r
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -239,7 +239,7 @@ func (client *DedicatedHostGroupsClient) getHandleResponse(resp *http.Response)
|
|||
// NewListByResourceGroupPager - Lists all of the dedicated host groups in the specified resource group. Use the nextLink
|
||||
// property in the response to get the next page of dedicated host groups.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - DedicatedHostGroupsClientListByResourceGroupOptions contains the optional parameters for the DedicatedHostGroupsClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -282,7 +282,7 @@ func (client *DedicatedHostGroupsClient) listByResourceGroupCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -300,7 +300,7 @@ func (client *DedicatedHostGroupsClient) listByResourceGroupHandleResponse(resp
|
|||
// NewListBySubscriptionPager - Lists all of the dedicated host groups in the subscription. Use the nextLink property in the
|
||||
// response to get the next page of dedicated host groups.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - DedicatedHostGroupsClientListBySubscriptionOptions contains the optional parameters for the DedicatedHostGroupsClient.NewListBySubscriptionPager
|
||||
// method.
|
||||
func (client *DedicatedHostGroupsClient) NewListBySubscriptionPager(options *DedicatedHostGroupsClientListBySubscriptionOptions) *runtime.Pager[DedicatedHostGroupsClientListBySubscriptionResponse] {
|
||||
|
|
@ -338,7 +338,7 @@ func (client *DedicatedHostGroupsClient) listBySubscriptionCreateRequest(ctx con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -356,7 +356,7 @@ func (client *DedicatedHostGroupsClient) listBySubscriptionHandleResponse(resp *
|
|||
// Update - Update an dedicated host group.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - parameters - Parameters supplied to the Update Dedicated Host Group operation.
|
||||
|
|
@ -404,7 +404,7 @@ func (client *DedicatedHostGroupsClient) updateCreateRequest(ctx context.Context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewDedicatedHostsClient(subscriptionID string, credential azcore.TokenCrede
|
|||
// BeginCreateOrUpdate - Create or update a dedicated host .
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - hostName - The name of the dedicated host .
|
||||
|
|
@ -74,7 +74,7 @@ func (client *DedicatedHostsClient) BeginCreateOrUpdate(ctx context.Context, res
|
|||
// CreateOrUpdate - Create or update a dedicated host .
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *DedicatedHostsClient) createOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost, options *DedicatedHostsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DedicatedHostsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -120,7 +120,7 @@ func (client *DedicatedHostsClient) createOrUpdateCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -132,7 +132,7 @@ func (client *DedicatedHostsClient) createOrUpdateCreateRequest(ctx context.Cont
|
|||
// BeginDelete - Delete a dedicated host.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - hostName - The name of the dedicated host.
|
||||
|
|
@ -158,7 +158,7 @@ func (client *DedicatedHostsClient) BeginDelete(ctx context.Context, resourceGro
|
|||
// Delete - Delete a dedicated host.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *DedicatedHostsClient) deleteOperation(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DedicatedHostsClient.BeginDelete"
|
||||
|
|
@ -204,7 +204,7 @@ func (client *DedicatedHostsClient) deleteCreateRequest(ctx context.Context, res
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -213,7 +213,7 @@ func (client *DedicatedHostsClient) deleteCreateRequest(ctx context.Context, res
|
|||
// Get - Retrieves information about a dedicated host.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - hostName - The name of the dedicated host.
|
||||
|
|
@ -267,7 +267,7 @@ func (client *DedicatedHostsClient) getCreateRequest(ctx context.Context, resour
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -285,7 +285,7 @@ func (client *DedicatedHostsClient) getHandleResponse(resp *http.Response) (Dedi
|
|||
// NewListAvailableSizesPager - Lists all available dedicated host sizes to which the specified dedicated host can be resized.
|
||||
// NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - hostName - The name of the dedicated host.
|
||||
|
|
@ -339,7 +339,7 @@ func (client *DedicatedHostsClient) listAvailableSizesCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -357,7 +357,7 @@ func (client *DedicatedHostsClient) listAvailableSizesHandleResponse(resp *http.
|
|||
// NewListByHostGroupPager - Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property
|
||||
// in the response to get the next page of dedicated hosts.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - options - DedicatedHostsClientListByHostGroupOptions contains the optional parameters for the DedicatedHostsClient.NewListByHostGroupPager
|
||||
|
|
@ -405,7 +405,7 @@ func (client *DedicatedHostsClient) listByHostGroupCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -420,13 +420,100 @@ func (client *DedicatedHostsClient) listByHostGroupHandleResponse(resp *http.Res
|
|||
return result, nil
|
||||
}
|
||||
|
||||
// BeginRedeploy - Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated
|
||||
// to a new node and is running. To determine the health of VMs deployed on the dedicated host
|
||||
// after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview
|
||||
// for more details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - hostName - The name of the dedicated host.
|
||||
// - options - DedicatedHostsClientBeginRedeployOptions contains the optional parameters for the DedicatedHostsClient.BeginRedeploy
|
||||
// method.
|
||||
func (client *DedicatedHostsClient) BeginRedeploy(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRedeployOptions) (*runtime.Poller[DedicatedHostsClientRedeployResponse], error) {
|
||||
if options == nil || options.ResumeToken == "" {
|
||||
resp, err := client.redeploy(ctx, resourceGroupName, hostGroupName, hostName, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientRedeployResponse]{
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientRedeployResponse]{
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Redeploy - Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to
|
||||
// a new node and is running. To determine the health of VMs deployed on the dedicated host
|
||||
// after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview
|
||||
// for more details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *DedicatedHostsClient) redeploy(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRedeployOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DedicatedHostsClient.BeginRedeploy"
|
||||
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
|
||||
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
req, err := client.redeployCreateRequest(ctx, resourceGroupName, hostGroupName, hostName, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
httpResp, err := client.internal.Pipeline().Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
|
||||
err = runtime.NewResponseError(httpResp)
|
||||
return nil, err
|
||||
}
|
||||
return httpResp, nil
|
||||
}
|
||||
|
||||
// redeployCreateRequest creates the Redeploy request.
|
||||
func (client *DedicatedHostsClient) redeployCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRedeployOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/redeploy"
|
||||
if resourceGroupName == "" {
|
||||
return nil, errors.New("parameter resourceGroupName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
|
||||
if hostGroupName == "" {
|
||||
return nil, errors.New("parameter hostGroupName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
|
||||
if hostName == "" {
|
||||
return nil, errors.New("parameter hostName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName))
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
|
||||
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// BeginRestart - Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted
|
||||
// and is running. To determine the health of VMs deployed on the dedicated host after the
|
||||
// restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview
|
||||
// for more details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - hostName - The name of the dedicated host.
|
||||
|
|
@ -455,7 +542,7 @@ func (client *DedicatedHostsClient) BeginRestart(ctx context.Context, resourceGr
|
|||
// for more details.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *DedicatedHostsClient) restart(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRestartOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DedicatedHostsClient.BeginRestart"
|
||||
|
|
@ -501,7 +588,7 @@ func (client *DedicatedHostsClient) restartCreateRequest(ctx context.Context, re
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -510,7 +597,7 @@ func (client *DedicatedHostsClient) restartCreateRequest(ctx context.Context, re
|
|||
// BeginUpdate - Update a dedicated host .
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - hostGroupName - The name of the dedicated host group.
|
||||
// - hostName - The name of the dedicated host .
|
||||
|
|
@ -537,7 +624,7 @@ func (client *DedicatedHostsClient) BeginUpdate(ctx context.Context, resourceGro
|
|||
// Update - Update a dedicated host .
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *DedicatedHostsClient) update(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate, options *DedicatedHostsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DedicatedHostsClient.BeginUpdate"
|
||||
|
|
@ -583,7 +670,7 @@ func (client *DedicatedHostsClient) updateCreateRequest(ctx context.Context, res
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewDiskAccessesClient(subscriptionID string, credential azcore.TokenCredent
|
|||
// BeginCreateOrUpdate - Creates or updates a disk access resource
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -75,7 +75,7 @@ func (client *DiskAccessesClient) BeginCreateOrUpdate(ctx context.Context, resou
|
|||
// CreateOrUpdate - Creates or updates a disk access resource
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskAccessesClient) createOrUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess, options *DiskAccessesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskAccessesClient.BeginCreateOrUpdate"
|
||||
|
|
@ -117,7 +117,7 @@ func (client *DiskAccessesClient) createOrUpdateCreateRequest(ctx context.Contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, diskAccess); err != nil {
|
||||
|
|
@ -129,7 +129,7 @@ func (client *DiskAccessesClient) createOrUpdateCreateRequest(ctx context.Contex
|
|||
// BeginDelete - Deletes a disk access resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -156,7 +156,7 @@ func (client *DiskAccessesClient) BeginDelete(ctx context.Context, resourceGroup
|
|||
// Delete - Deletes a disk access resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskAccessesClient) deleteOperation(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskAccessesClient.BeginDelete"
|
||||
|
|
@ -198,7 +198,7 @@ func (client *DiskAccessesClient) deleteCreateRequest(ctx context.Context, resou
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -207,7 +207,7 @@ func (client *DiskAccessesClient) deleteCreateRequest(ctx context.Context, resou
|
|||
// BeginDeleteAPrivateEndpointConnection - Deletes a private endpoint connection under a disk access resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -235,7 +235,7 @@ func (client *DiskAccessesClient) BeginDeleteAPrivateEndpointConnection(ctx cont
|
|||
// DeleteAPrivateEndpointConnection - Deletes a private endpoint connection under a disk access resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskAccessesClient) deleteAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, options *DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskAccessesClient.BeginDeleteAPrivateEndpointConnection"
|
||||
|
|
@ -281,7 +281,7 @@ func (client *DiskAccessesClient) deleteAPrivateEndpointConnectionCreateRequest(
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -290,7 +290,7 @@ func (client *DiskAccessesClient) deleteAPrivateEndpointConnectionCreateRequest(
|
|||
// Get - Gets information about a disk access resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -338,7 +338,7 @@ func (client *DiskAccessesClient) getCreateRequest(ctx context.Context, resource
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -356,7 +356,7 @@ func (client *DiskAccessesClient) getHandleResponse(resp *http.Response) (DiskAc
|
|||
// GetAPrivateEndpointConnection - Gets information about a private endpoint connection under a disk access resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -410,7 +410,7 @@ func (client *DiskAccessesClient) getAPrivateEndpointConnectionCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -428,7 +428,7 @@ func (client *DiskAccessesClient) getAPrivateEndpointConnectionHandleResponse(re
|
|||
// GetPrivateLinkResources - Gets the private link resources possible under disk access resource
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -477,7 +477,7 @@ func (client *DiskAccessesClient) getPrivateLinkResourcesCreateRequest(ctx conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -494,7 +494,7 @@ func (client *DiskAccessesClient) getPrivateLinkResourcesHandleResponse(resp *ht
|
|||
|
||||
// NewListPager - Lists all the disk access resources under a subscription.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - options - DiskAccessesClientListOptions contains the optional parameters for the DiskAccessesClient.NewListPager method.
|
||||
func (client *DiskAccessesClient) NewListPager(options *DiskAccessesClientListOptions) *runtime.Pager[DiskAccessesClientListResponse] {
|
||||
return runtime.NewPager(runtime.PagingHandler[DiskAccessesClientListResponse]{
|
||||
|
|
@ -531,7 +531,7 @@ func (client *DiskAccessesClient) listCreateRequest(ctx context.Context, options
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -548,7 +548,7 @@ func (client *DiskAccessesClient) listHandleResponse(resp *http.Response) (DiskA
|
|||
|
||||
// NewListByResourceGroupPager - Lists all the disk access resources under a resource group.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - DiskAccessesClientListByResourceGroupOptions contains the optional parameters for the DiskAccessesClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -591,7 +591,7 @@ func (client *DiskAccessesClient) listByResourceGroupCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -608,7 +608,7 @@ func (client *DiskAccessesClient) listByResourceGroupHandleResponse(resp *http.R
|
|||
|
||||
// NewListPrivateEndpointConnectionsPager - List information about private endpoint connections under a disk access resource
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -658,7 +658,7 @@ func (client *DiskAccessesClient) listPrivateEndpointConnectionsCreateRequest(ct
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -676,7 +676,7 @@ func (client *DiskAccessesClient) listPrivateEndpointConnectionsHandleResponse(r
|
|||
// BeginUpdate - Updates (patches) a disk access resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -704,7 +704,7 @@ func (client *DiskAccessesClient) BeginUpdate(ctx context.Context, resourceGroup
|
|||
// Update - Updates (patches) a disk access resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskAccessesClient) update(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate, options *DiskAccessesClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskAccessesClient.BeginUpdate"
|
||||
|
|
@ -746,7 +746,7 @@ func (client *DiskAccessesClient) updateCreateRequest(ctx context.Context, resou
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, diskAccess); err != nil {
|
||||
|
|
@ -759,7 +759,7 @@ func (client *DiskAccessesClient) updateCreateRequest(ctx context.Context, resou
|
|||
// can't be used to create a new private endpoint connection.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
|
||||
// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
|
||||
|
|
@ -790,7 +790,7 @@ func (client *DiskAccessesClient) BeginUpdateAPrivateEndpointConnection(ctx cont
|
|||
// be used to create a new private endpoint connection.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskAccessesClient) updateAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskAccessesClient.BeginUpdateAPrivateEndpointConnection"
|
||||
|
|
@ -836,7 +836,7 @@ func (client *DiskAccessesClient) updateAPrivateEndpointConnectionCreateRequest(
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, privateEndpointConnection); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewDiskEncryptionSetsClient(subscriptionID string, credential azcore.TokenC
|
|||
// BeginCreateOrUpdate - Creates or updates a disk encryption set
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
|
||||
// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
|
||||
|
|
@ -75,7 +75,7 @@ func (client *DiskEncryptionSetsClient) BeginCreateOrUpdate(ctx context.Context,
|
|||
// CreateOrUpdate - Creates or updates a disk encryption set
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskEncryptionSetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet, options *DiskEncryptionSetsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskEncryptionSetsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -117,7 +117,7 @@ func (client *DiskEncryptionSetsClient) createOrUpdateCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, diskEncryptionSet); err != nil {
|
||||
|
|
@ -129,7 +129,7 @@ func (client *DiskEncryptionSetsClient) createOrUpdateCreateRequest(ctx context.
|
|||
// BeginDelete - Deletes a disk encryption set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
|
||||
// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
|
||||
|
|
@ -156,7 +156,7 @@ func (client *DiskEncryptionSetsClient) BeginDelete(ctx context.Context, resourc
|
|||
// Delete - Deletes a disk encryption set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskEncryptionSetsClient) deleteOperation(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskEncryptionSetsClient.BeginDelete"
|
||||
|
|
@ -198,7 +198,7 @@ func (client *DiskEncryptionSetsClient) deleteCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -207,7 +207,7 @@ func (client *DiskEncryptionSetsClient) deleteCreateRequest(ctx context.Context,
|
|||
// Get - Gets information about a disk encryption set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
|
||||
// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
|
||||
|
|
@ -255,7 +255,7 @@ func (client *DiskEncryptionSetsClient) getCreateRequest(ctx context.Context, re
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -272,7 +272,7 @@ func (client *DiskEncryptionSetsClient) getHandleResponse(resp *http.Response) (
|
|||
|
||||
// NewListPager - Lists all the disk encryption sets under a subscription.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - options - DiskEncryptionSetsClientListOptions contains the optional parameters for the DiskEncryptionSetsClient.NewListPager
|
||||
// method.
|
||||
func (client *DiskEncryptionSetsClient) NewListPager(options *DiskEncryptionSetsClientListOptions) *runtime.Pager[DiskEncryptionSetsClientListResponse] {
|
||||
|
|
@ -310,7 +310,7 @@ func (client *DiskEncryptionSetsClient) listCreateRequest(ctx context.Context, o
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -327,7 +327,7 @@ func (client *DiskEncryptionSetsClient) listHandleResponse(resp *http.Response)
|
|||
|
||||
// NewListAssociatedResourcesPager - Lists all resources that are encrypted with this disk encryption set.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
|
||||
// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
|
||||
|
|
@ -377,7 +377,7 @@ func (client *DiskEncryptionSetsClient) listAssociatedResourcesCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -394,7 +394,7 @@ func (client *DiskEncryptionSetsClient) listAssociatedResourcesHandleResponse(re
|
|||
|
||||
// NewListByResourceGroupPager - Lists all the disk encryption sets under a resource group.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - DiskEncryptionSetsClientListByResourceGroupOptions contains the optional parameters for the DiskEncryptionSetsClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -437,7 +437,7 @@ func (client *DiskEncryptionSetsClient) listByResourceGroupCreateRequest(ctx con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -455,7 +455,7 @@ func (client *DiskEncryptionSetsClient) listByResourceGroupHandleResponse(resp *
|
|||
// BeginUpdate - Updates (patches) a disk encryption set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
|
||||
// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
|
||||
|
|
@ -483,7 +483,7 @@ func (client *DiskEncryptionSetsClient) BeginUpdate(ctx context.Context, resourc
|
|||
// Update - Updates (patches) a disk encryption set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskEncryptionSetsClient) update(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate, options *DiskEncryptionSetsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskEncryptionSetsClient.BeginUpdate"
|
||||
|
|
@ -525,7 +525,7 @@ func (client *DiskEncryptionSetsClient) updateCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, diskEncryptionSet); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewDiskRestorePointClient(subscriptionID string, credential azcore.TokenCre
|
|||
// Get - Get disk restorePoint resource
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection that the disk restore point belongs.
|
||||
// - vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs.
|
||||
|
|
@ -103,7 +103,7 @@ func (client *DiskRestorePointClient) getCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -121,7 +121,7 @@ func (client *DiskRestorePointClient) getHandleResponse(resp *http.Response) (Di
|
|||
// BeginGrantAccess - Grants access to a diskRestorePoint.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection that the disk restore point belongs.
|
||||
// - vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs.
|
||||
|
|
@ -150,7 +150,7 @@ func (client *DiskRestorePointClient) BeginGrantAccess(ctx context.Context, reso
|
|||
// GrantAccess - Grants access to a diskRestorePoint.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskRestorePointClient) grantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData, options *DiskRestorePointClientBeginGrantAccessOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskRestorePointClient.BeginGrantAccess"
|
||||
|
|
@ -200,7 +200,7 @@ func (client *DiskRestorePointClient) grantAccessCreateRequest(ctx context.Conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, grantAccessData); err != nil {
|
||||
|
|
@ -211,7 +211,7 @@ func (client *DiskRestorePointClient) grantAccessCreateRequest(ctx context.Conte
|
|||
|
||||
// NewListByRestorePointPager - Lists diskRestorePoints under a vmRestorePoint.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection that the disk restore point belongs.
|
||||
// - vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs.
|
||||
|
|
@ -264,7 +264,7 @@ func (client *DiskRestorePointClient) listByRestorePointCreateRequest(ctx contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -282,7 +282,7 @@ func (client *DiskRestorePointClient) listByRestorePointHandleResponse(resp *htt
|
|||
// BeginRevokeAccess - Revokes access to a diskRestorePoint.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection that the disk restore point belongs.
|
||||
// - vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs.
|
||||
|
|
@ -310,7 +310,7 @@ func (client *DiskRestorePointClient) BeginRevokeAccess(ctx context.Context, res
|
|||
// RevokeAccess - Revokes access to a diskRestorePoint.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DiskRestorePointClient) revokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, options *DiskRestorePointClientBeginRevokeAccessOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DiskRestorePointClient.BeginRevokeAccess"
|
||||
|
|
@ -360,7 +360,7 @@ func (client *DiskRestorePointClient) revokeAccessCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewDisksClient(subscriptionID string, credential azcore.TokenCredential, op
|
|||
// BeginCreateOrUpdate - Creates or updates a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
|
||||
// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
|
||||
|
|
@ -75,7 +75,7 @@ func (client *DisksClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou
|
|||
// CreateOrUpdate - Creates or updates a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DisksClient) createOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk, options *DisksClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DisksClient.BeginCreateOrUpdate"
|
||||
|
|
@ -117,7 +117,7 @@ func (client *DisksClient) createOrUpdateCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, disk); err != nil {
|
||||
|
|
@ -129,7 +129,7 @@ func (client *DisksClient) createOrUpdateCreateRequest(ctx context.Context, reso
|
|||
// BeginDelete - Deletes a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
|
||||
// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
|
||||
|
|
@ -155,7 +155,7 @@ func (client *DisksClient) BeginDelete(ctx context.Context, resourceGroupName st
|
|||
// Delete - Deletes a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DisksClient) deleteOperation(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DisksClient.BeginDelete"
|
||||
|
|
@ -197,7 +197,7 @@ func (client *DisksClient) deleteCreateRequest(ctx context.Context, resourceGrou
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
return req, nil
|
||||
}
|
||||
|
|
@ -205,7 +205,7 @@ func (client *DisksClient) deleteCreateRequest(ctx context.Context, resourceGrou
|
|||
// Get - Gets information about a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
|
||||
// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
|
||||
|
|
@ -253,7 +253,7 @@ func (client *DisksClient) getCreateRequest(ctx context.Context, resourceGroupNa
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -271,7 +271,7 @@ func (client *DisksClient) getHandleResponse(resp *http.Response) (DisksClientGe
|
|||
// BeginGrantAccess - Grants access to a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
|
||||
// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
|
||||
|
|
@ -299,7 +299,7 @@ func (client *DisksClient) BeginGrantAccess(ctx context.Context, resourceGroupNa
|
|||
// GrantAccess - Grants access to a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DisksClient) grantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData, options *DisksClientBeginGrantAccessOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DisksClient.BeginGrantAccess"
|
||||
|
|
@ -341,7 +341,7 @@ func (client *DisksClient) grantAccessCreateRequest(ctx context.Context, resourc
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, grantAccessData); err != nil {
|
||||
|
|
@ -352,7 +352,7 @@ func (client *DisksClient) grantAccessCreateRequest(ctx context.Context, resourc
|
|||
|
||||
// NewListPager - Lists all the disks under a subscription.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - options - DisksClientListOptions contains the optional parameters for the DisksClient.NewListPager method.
|
||||
func (client *DisksClient) NewListPager(options *DisksClientListOptions) *runtime.Pager[DisksClientListResponse] {
|
||||
return runtime.NewPager(runtime.PagingHandler[DisksClientListResponse]{
|
||||
|
|
@ -389,7 +389,7 @@ func (client *DisksClient) listCreateRequest(ctx context.Context, options *Disks
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -406,7 +406,7 @@ func (client *DisksClient) listHandleResponse(resp *http.Response) (DisksClientL
|
|||
|
||||
// NewListByResourceGroupPager - Lists all the disks under a resource group.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - DisksClientListByResourceGroupOptions contains the optional parameters for the DisksClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -449,7 +449,7 @@ func (client *DisksClient) listByResourceGroupCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -467,7 +467,7 @@ func (client *DisksClient) listByResourceGroupHandleResponse(resp *http.Response
|
|||
// BeginRevokeAccess - Revokes access to a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
|
||||
// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
|
||||
|
|
@ -494,7 +494,7 @@ func (client *DisksClient) BeginRevokeAccess(ctx context.Context, resourceGroupN
|
|||
// RevokeAccess - Revokes access to a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DisksClient) revokeAccess(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginRevokeAccessOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DisksClient.BeginRevokeAccess"
|
||||
|
|
@ -536,7 +536,7 @@ func (client *DisksClient) revokeAccessCreateRequest(ctx context.Context, resour
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
return req, nil
|
||||
}
|
||||
|
|
@ -544,7 +544,7 @@ func (client *DisksClient) revokeAccessCreateRequest(ctx context.Context, resour
|
|||
// BeginUpdate - Updates (patches) a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
|
||||
// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
|
||||
|
|
@ -571,7 +571,7 @@ func (client *DisksClient) BeginUpdate(ctx context.Context, resourceGroupName st
|
|||
// Update - Updates (patches) a disk.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *DisksClient) update(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate, options *DisksClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "DisksClient.BeginUpdate"
|
||||
|
|
@ -613,7 +613,7 @@ func (client *DisksClient) updateCreateRequest(ctx context.Context, resourceGrou
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, disk); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewGalleriesClient(subscriptionID string, credential azcore.TokenCredential
|
|||
// BeginCreateOrUpdate - Create or update a Shared Image Gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods
|
||||
// allowed in the middle. The maximum length is 80 characters.
|
||||
|
|
@ -74,7 +74,7 @@ func (client *GalleriesClient) BeginCreateOrUpdate(ctx context.Context, resource
|
|||
// CreateOrUpdate - Create or update a Shared Image Gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery, options *GalleriesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleriesClient.BeginCreateOrUpdate"
|
||||
|
|
@ -116,7 +116,7 @@ func (client *GalleriesClient) createOrUpdateCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, gallery); err != nil {
|
||||
|
|
@ -128,7 +128,7 @@ func (client *GalleriesClient) createOrUpdateCreateRequest(ctx context.Context,
|
|||
// BeginDelete - Delete a Shared Image Gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery to be deleted.
|
||||
// - options - GalleriesClientBeginDeleteOptions contains the optional parameters for the GalleriesClient.BeginDelete method.
|
||||
|
|
@ -152,7 +152,7 @@ func (client *GalleriesClient) BeginDelete(ctx context.Context, resourceGroupNam
|
|||
// Delete - Delete a Shared Image Gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleriesClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleriesClient.BeginDelete"
|
||||
|
|
@ -194,7 +194,7 @@ func (client *GalleriesClient) deleteCreateRequest(ctx context.Context, resource
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -203,7 +203,7 @@ func (client *GalleriesClient) deleteCreateRequest(ctx context.Context, resource
|
|||
// Get - Retrieves information about a Shared Image Gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery.
|
||||
// - options - GalleriesClientGetOptions contains the optional parameters for the GalleriesClient.Get method.
|
||||
|
|
@ -249,7 +249,7 @@ func (client *GalleriesClient) getCreateRequest(ctx context.Context, resourceGro
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
if options != nil && options.Select != nil {
|
||||
reqQP.Set("$select", string(*options.Select))
|
||||
}
|
||||
|
|
@ -272,7 +272,7 @@ func (client *GalleriesClient) getHandleResponse(resp *http.Response) (Galleries
|
|||
|
||||
// NewListPager - List galleries under a subscription.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - options - GalleriesClientListOptions contains the optional parameters for the GalleriesClient.NewListPager method.
|
||||
func (client *GalleriesClient) NewListPager(options *GalleriesClientListOptions) *runtime.Pager[GalleriesClientListResponse] {
|
||||
return runtime.NewPager(runtime.PagingHandler[GalleriesClientListResponse]{
|
||||
|
|
@ -309,7 +309,7 @@ func (client *GalleriesClient) listCreateRequest(ctx context.Context, options *G
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -326,7 +326,7 @@ func (client *GalleriesClient) listHandleResponse(resp *http.Response) (Gallerie
|
|||
|
||||
// NewListByResourceGroupPager - List galleries under a resource group.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - GalleriesClientListByResourceGroupOptions contains the optional parameters for the GalleriesClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -369,7 +369,7 @@ func (client *GalleriesClient) listByResourceGroupCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -387,7 +387,7 @@ func (client *GalleriesClient) listByResourceGroupHandleResponse(resp *http.Resp
|
|||
// BeginUpdate - Update a Shared Image Gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods
|
||||
// allowed in the middle. The maximum length is 80 characters.
|
||||
|
|
@ -413,7 +413,7 @@ func (client *GalleriesClient) BeginUpdate(ctx context.Context, resourceGroupNam
|
|||
// Update - Update a Shared Image Gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleriesClient) update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate, options *GalleriesClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleriesClient.BeginUpdate"
|
||||
|
|
@ -455,7 +455,7 @@ func (client *GalleriesClient) updateCreateRequest(ctx context.Context, resource
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, gallery); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewGalleryApplicationsClient(subscriptionID string, credential azcore.Token
|
|||
// BeginCreateOrUpdate - Create or update a gallery Application Definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be created.
|
||||
// - galleryApplicationName - The name of the gallery Application Definition to be created or updated. The allowed characters
|
||||
|
|
@ -76,7 +76,7 @@ func (client *GalleryApplicationsClient) BeginCreateOrUpdate(ctx context.Context
|
|||
// CreateOrUpdate - Create or update a gallery Application Definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryApplicationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication, options *GalleryApplicationsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryApplicationsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -122,7 +122,7 @@ func (client *GalleryApplicationsClient) createOrUpdateCreateRequest(ctx context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, galleryApplication); err != nil {
|
||||
|
|
@ -134,7 +134,7 @@ func (client *GalleryApplicationsClient) createOrUpdateCreateRequest(ctx context
|
|||
// BeginDelete - Delete a gallery Application.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be deleted.
|
||||
// - galleryApplicationName - The name of the gallery Application Definition to be deleted.
|
||||
|
|
@ -160,7 +160,7 @@ func (client *GalleryApplicationsClient) BeginDelete(ctx context.Context, resour
|
|||
// Delete - Delete a gallery Application.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryApplicationsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryApplicationsClient.BeginDelete"
|
||||
|
|
@ -206,7 +206,7 @@ func (client *GalleryApplicationsClient) deleteCreateRequest(ctx context.Context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -215,7 +215,7 @@ func (client *GalleryApplicationsClient) deleteCreateRequest(ctx context.Context
|
|||
// Get - Retrieves information about a gallery Application Definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery from which the Application Definitions are to be retrieved.
|
||||
// - galleryApplicationName - The name of the gallery Application Definition to be retrieved.
|
||||
|
|
@ -266,7 +266,7 @@ func (client *GalleryApplicationsClient) getCreateRequest(ctx context.Context, r
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -283,7 +283,7 @@ func (client *GalleryApplicationsClient) getHandleResponse(resp *http.Response)
|
|||
|
||||
// NewListByGalleryPager - List gallery Application Definitions in a gallery.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery from which Application Definitions are to be listed.
|
||||
// - options - GalleryApplicationsClientListByGalleryOptions contains the optional parameters for the GalleryApplicationsClient.NewListByGalleryPager
|
||||
|
|
@ -331,7 +331,7 @@ func (client *GalleryApplicationsClient) listByGalleryCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -349,7 +349,7 @@ func (client *GalleryApplicationsClient) listByGalleryHandleResponse(resp *http.
|
|||
// BeginUpdate - Update a gallery Application Definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be updated.
|
||||
// - galleryApplicationName - The name of the gallery Application Definition to be updated. The allowed characters are alphabets
|
||||
|
|
@ -378,7 +378,7 @@ func (client *GalleryApplicationsClient) BeginUpdate(ctx context.Context, resour
|
|||
// Update - Update a gallery Application Definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryApplicationsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate, options *GalleryApplicationsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryApplicationsClient.BeginUpdate"
|
||||
|
|
@ -424,7 +424,7 @@ func (client *GalleryApplicationsClient) updateCreateRequest(ctx context.Context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, galleryApplication); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewGalleryApplicationVersionsClient(subscriptionID string, credential azcor
|
|||
// BeginCreateOrUpdate - Create or update a gallery Application Version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
|
||||
// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version is to be created.
|
||||
|
|
@ -77,7 +77,7 @@ func (client *GalleryApplicationVersionsClient) BeginCreateOrUpdate(ctx context.
|
|||
// CreateOrUpdate - Create or update a gallery Application Version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryApplicationVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion, options *GalleryApplicationVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryApplicationVersionsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -127,7 +127,7 @@ func (client *GalleryApplicationVersionsClient) createOrUpdateCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, galleryApplicationVersion); err != nil {
|
||||
|
|
@ -139,7 +139,7 @@ func (client *GalleryApplicationVersionsClient) createOrUpdateCreateRequest(ctx
|
|||
// BeginDelete - Delete a gallery Application Version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
|
||||
// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version resides.
|
||||
|
|
@ -166,7 +166,7 @@ func (client *GalleryApplicationVersionsClient) BeginDelete(ctx context.Context,
|
|||
// Delete - Delete a gallery Application Version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryApplicationVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryApplicationVersionsClient.BeginDelete"
|
||||
|
|
@ -216,7 +216,7 @@ func (client *GalleryApplicationVersionsClient) deleteCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -225,7 +225,7 @@ func (client *GalleryApplicationVersionsClient) deleteCreateRequest(ctx context.
|
|||
// Get - Retrieves information about a gallery Application Version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
|
||||
// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version resides.
|
||||
|
|
@ -285,7 +285,7 @@ func (client *GalleryApplicationVersionsClient) getCreateRequest(ctx context.Con
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -302,7 +302,7 @@ func (client *GalleryApplicationVersionsClient) getHandleResponse(resp *http.Res
|
|||
|
||||
// NewListByGalleryApplicationPager - List gallery Application Versions in a gallery Application Definition.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
|
||||
// - galleryApplicationName - The name of the Shared Application Gallery Application Definition from which the Application Versions
|
||||
|
|
@ -356,7 +356,7 @@ func (client *GalleryApplicationVersionsClient) listByGalleryApplicationCreateRe
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -374,7 +374,7 @@ func (client *GalleryApplicationVersionsClient) listByGalleryApplicationHandleRe
|
|||
// BeginUpdate - Update a gallery Application Version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
|
||||
// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version is to be updated.
|
||||
|
|
@ -404,7 +404,7 @@ func (client *GalleryApplicationVersionsClient) BeginUpdate(ctx context.Context,
|
|||
// Update - Update a gallery Application Version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryApplicationVersionsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate, options *GalleryApplicationVersionsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryApplicationVersionsClient.BeginUpdate"
|
||||
|
|
@ -454,7 +454,7 @@ func (client *GalleryApplicationVersionsClient) updateCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, galleryApplicationVersion); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewGalleryImagesClient(subscriptionID string, credential azcore.TokenCreden
|
|||
// BeginCreateOrUpdate - Create or update a gallery image definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be created.
|
||||
// - galleryImageName - The name of the gallery image definition to be created or updated. The allowed characters are alphabets
|
||||
|
|
@ -76,7 +76,7 @@ func (client *GalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, reso
|
|||
// CreateOrUpdate - Create or update a gallery image definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryImagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage, options *GalleryImagesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryImagesClient.BeginCreateOrUpdate"
|
||||
|
|
@ -122,7 +122,7 @@ func (client *GalleryImagesClient) createOrUpdateCreateRequest(ctx context.Conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, galleryImage); err != nil {
|
||||
|
|
@ -134,7 +134,7 @@ func (client *GalleryImagesClient) createOrUpdateCreateRequest(ctx context.Conte
|
|||
// BeginDelete - Delete a gallery image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be deleted.
|
||||
// - galleryImageName - The name of the gallery image definition to be deleted.
|
||||
|
|
@ -160,7 +160,7 @@ func (client *GalleryImagesClient) BeginDelete(ctx context.Context, resourceGrou
|
|||
// Delete - Delete a gallery image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryImagesClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryImagesClient.BeginDelete"
|
||||
|
|
@ -206,7 +206,7 @@ func (client *GalleryImagesClient) deleteCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -215,7 +215,7 @@ func (client *GalleryImagesClient) deleteCreateRequest(ctx context.Context, reso
|
|||
// Get - Retrieves information about a gallery image definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
|
||||
// - galleryImageName - The name of the gallery image definition to be retrieved.
|
||||
|
|
@ -266,7 +266,7 @@ func (client *GalleryImagesClient) getCreateRequest(ctx context.Context, resourc
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -283,7 +283,7 @@ func (client *GalleryImagesClient) getHandleResponse(resp *http.Response) (Galle
|
|||
|
||||
// NewListByGalleryPager - List gallery image definitions in a gallery.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery from which Image Definitions are to be listed.
|
||||
// - options - GalleryImagesClientListByGalleryOptions contains the optional parameters for the GalleryImagesClient.NewListByGalleryPager
|
||||
|
|
@ -331,7 +331,7 @@ func (client *GalleryImagesClient) listByGalleryCreateRequest(ctx context.Contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -349,7 +349,7 @@ func (client *GalleryImagesClient) listByGalleryHandleResponse(resp *http.Respon
|
|||
// BeginUpdate - Update a gallery image definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be updated.
|
||||
// - galleryImageName - The name of the gallery image definition to be updated. The allowed characters are alphabets and numbers
|
||||
|
|
@ -377,7 +377,7 @@ func (client *GalleryImagesClient) BeginUpdate(ctx context.Context, resourceGrou
|
|||
// Update - Update a gallery image definition.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryImagesClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate, options *GalleryImagesClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryImagesClient.BeginUpdate"
|
||||
|
|
@ -423,7 +423,7 @@ func (client *GalleryImagesClient) updateCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, galleryImage); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewGalleryImageVersionsClient(subscriptionID string, credential azcore.Toke
|
|||
// BeginCreateOrUpdate - Create or update a gallery image version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
|
||||
// - galleryImageName - The name of the gallery image definition in which the Image Version is to be created.
|
||||
|
|
@ -77,7 +77,7 @@ func (client *GalleryImageVersionsClient) BeginCreateOrUpdate(ctx context.Contex
|
|||
// CreateOrUpdate - Create or update a gallery image version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryImageVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion, options *GalleryImageVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryImageVersionsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -127,7 +127,7 @@ func (client *GalleryImageVersionsClient) createOrUpdateCreateRequest(ctx contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, galleryImageVersion); err != nil {
|
||||
|
|
@ -139,7 +139,7 @@ func (client *GalleryImageVersionsClient) createOrUpdateCreateRequest(ctx contex
|
|||
// BeginDelete - Delete a gallery image version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
|
||||
// - galleryImageName - The name of the gallery image definition in which the Image Version resides.
|
||||
|
|
@ -166,7 +166,7 @@ func (client *GalleryImageVersionsClient) BeginDelete(ctx context.Context, resou
|
|||
// Delete - Delete a gallery image version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryImageVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryImageVersionsClient.BeginDelete"
|
||||
|
|
@ -216,7 +216,7 @@ func (client *GalleryImageVersionsClient) deleteCreateRequest(ctx context.Contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -225,7 +225,7 @@ func (client *GalleryImageVersionsClient) deleteCreateRequest(ctx context.Contex
|
|||
// Get - Retrieves information about a gallery image version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
|
||||
// - galleryImageName - The name of the gallery image definition in which the Image Version resides.
|
||||
|
|
@ -285,7 +285,7 @@ func (client *GalleryImageVersionsClient) getCreateRequest(ctx context.Context,
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -302,7 +302,7 @@ func (client *GalleryImageVersionsClient) getHandleResponse(resp *http.Response)
|
|||
|
||||
// NewListByGalleryImagePager - List gallery image versions in a gallery image definition.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
|
||||
// - galleryImageName - The name of the Shared Image Gallery Image Definition from which the Image Versions are to be listed.
|
||||
|
|
@ -355,7 +355,7 @@ func (client *GalleryImageVersionsClient) listByGalleryImageCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -373,7 +373,7 @@ func (client *GalleryImageVersionsClient) listByGalleryImageHandleResponse(resp
|
|||
// BeginUpdate - Update a gallery image version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
|
||||
// - galleryImageName - The name of the gallery image definition in which the Image Version is to be updated.
|
||||
|
|
@ -403,7 +403,7 @@ func (client *GalleryImageVersionsClient) BeginUpdate(ctx context.Context, resou
|
|||
// Update - Update a gallery image version.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GalleryImageVersionsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate, options *GalleryImageVersionsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GalleryImageVersionsClient.BeginUpdate"
|
||||
|
|
@ -453,7 +453,7 @@ func (client *GalleryImageVersionsClient) updateCreateRequest(ctx context.Contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, galleryImageVersion); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewGallerySharingProfileClient(subscriptionID string, credential azcore.Tok
|
|||
// BeginUpdate - Update sharing profile of a gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - galleryName - The name of the Shared Image Gallery.
|
||||
// - sharingUpdate - Parameters supplied to the update gallery sharing profile.
|
||||
|
|
@ -73,7 +73,7 @@ func (client *GallerySharingProfileClient) BeginUpdate(ctx context.Context, reso
|
|||
// Update - Update sharing profile of a gallery.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
func (client *GallerySharingProfileClient) update(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate, options *GallerySharingProfileClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "GallerySharingProfileClient.BeginUpdate"
|
||||
|
|
@ -115,7 +115,7 @@ func (client *GallerySharingProfileClient) updateCreateRequest(ctx context.Conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, sharingUpdate); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, o
|
|||
// BeginCreateOrUpdate - Create or update an image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - imageName - The name of the image.
|
||||
// - parameters - Parameters supplied to the Create Image operation.
|
||||
|
|
@ -73,7 +73,7 @@ func (client *ImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGro
|
|||
// CreateOrUpdate - Create or update an image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *ImagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image, options *ImagesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "ImagesClient.BeginCreateOrUpdate"
|
||||
|
|
@ -115,7 +115,7 @@ func (client *ImagesClient) createOrUpdateCreateRequest(ctx context.Context, res
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -127,7 +127,7 @@ func (client *ImagesClient) createOrUpdateCreateRequest(ctx context.Context, res
|
|||
// BeginDelete - Deletes an Image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - imageName - The name of the image.
|
||||
// - options - ImagesClientBeginDeleteOptions contains the optional parameters for the ImagesClient.BeginDelete method.
|
||||
|
|
@ -151,7 +151,7 @@ func (client *ImagesClient) BeginDelete(ctx context.Context, resourceGroupName s
|
|||
// Delete - Deletes an Image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *ImagesClient) deleteOperation(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "ImagesClient.BeginDelete"
|
||||
|
|
@ -193,7 +193,7 @@ func (client *ImagesClient) deleteCreateRequest(ctx context.Context, resourceGro
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -202,7 +202,7 @@ func (client *ImagesClient) deleteCreateRequest(ctx context.Context, resourceGro
|
|||
// Get - Gets an image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - imageName - The name of the image.
|
||||
// - options - ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
|
||||
|
|
@ -251,7 +251,7 @@ func (client *ImagesClient) getCreateRequest(ctx context.Context, resourceGroupN
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -269,7 +269,7 @@ func (client *ImagesClient) getHandleResponse(resp *http.Response) (ImagesClient
|
|||
// NewListPager - Gets the list of Images in the subscription. Use nextLink property in the response to get the next page
|
||||
// of Images. Do this till nextLink is null to fetch all the Images.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - ImagesClientListOptions contains the optional parameters for the ImagesClient.NewListPager method.
|
||||
func (client *ImagesClient) NewListPager(options *ImagesClientListOptions) *runtime.Pager[ImagesClientListResponse] {
|
||||
return runtime.NewPager(runtime.PagingHandler[ImagesClientListResponse]{
|
||||
|
|
@ -306,7 +306,7 @@ func (client *ImagesClient) listCreateRequest(ctx context.Context, options *Imag
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -324,7 +324,7 @@ func (client *ImagesClient) listHandleResponse(resp *http.Response) (ImagesClien
|
|||
// NewListByResourceGroupPager - Gets the list of images under a resource group. Use nextLink property in the response to
|
||||
// get the next page of Images. Do this till nextLink is null to fetch all the Images.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - ImagesClientListByResourceGroupOptions contains the optional parameters for the ImagesClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -367,7 +367,7 @@ func (client *ImagesClient) listByResourceGroupCreateRequest(ctx context.Context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -385,7 +385,7 @@ func (client *ImagesClient) listByResourceGroupHandleResponse(resp *http.Respons
|
|||
// BeginUpdate - Update an image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - imageName - The name of the image.
|
||||
// - parameters - Parameters supplied to the Update Image operation.
|
||||
|
|
@ -410,7 +410,7 @@ func (client *ImagesClient) BeginUpdate(ctx context.Context, resourceGroupName s
|
|||
// Update - Update an image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *ImagesClient) update(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate, options *ImagesClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "ImagesClient.BeginUpdate"
|
||||
|
|
@ -452,7 +452,7 @@ func (client *ImagesClient) updateCreateRequest(ctx context.Context, resourceGro
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func NewLogAnalyticsClient(subscriptionID string, credential azcore.TokenCredent
|
|||
// to show throttling activities.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The location upon which virtual-machine-sizes is queried.
|
||||
// - parameters - Parameters supplied to the LogAnalytics getRequestRateByInterval Api.
|
||||
// - options - LogAnalyticsClientBeginExportRequestRateByIntervalOptions contains the optional parameters for the LogAnalyticsClient.BeginExportRequestRateByInterval
|
||||
|
|
@ -75,7 +75,7 @@ func (client *LogAnalyticsClient) BeginExportRequestRateByInterval(ctx context.C
|
|||
// show throttling activities.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *LogAnalyticsClient) exportRequestRateByInterval(ctx context.Context, location string, parameters RequestRateByIntervalInput, options *LogAnalyticsClientBeginExportRequestRateByIntervalOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "LogAnalyticsClient.BeginExportRequestRateByInterval"
|
||||
|
|
@ -113,7 +113,7 @@ func (client *LogAnalyticsClient) exportRequestRateByIntervalCreateRequest(ctx c
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -126,7 +126,7 @@ func (client *LogAnalyticsClient) exportRequestRateByIntervalCreateRequest(ctx c
|
|||
// window.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The location upon which virtual-machine-sizes is queried.
|
||||
// - parameters - Parameters supplied to the LogAnalytics getThrottledRequests Api.
|
||||
// - options - LogAnalyticsClientBeginExportThrottledRequestsOptions contains the optional parameters for the LogAnalyticsClient.BeginExportThrottledRequests
|
||||
|
|
@ -152,7 +152,7 @@ func (client *LogAnalyticsClient) BeginExportThrottledRequests(ctx context.Conte
|
|||
// ExportThrottledRequests - Export logs that show total throttled Api requests for this subscription in the given time window.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *LogAnalyticsClient) exportThrottledRequests(ctx context.Context, location string, parameters ThrottledRequestsInput, options *LogAnalyticsClientBeginExportThrottledRequestsOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "LogAnalyticsClient.BeginExportThrottledRequests"
|
||||
|
|
@ -190,7 +190,7 @@ func (client *LogAnalyticsClient) exportThrottledRequestsCreateRequest(ctx conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
299
vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/models.go
generated
vendored
299
vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/models.go
generated
vendored
|
|
@ -101,6 +101,15 @@ type ApplicationProfile struct {
|
|||
GalleryApplications []*VMGalleryApplication
|
||||
}
|
||||
|
||||
// AttachDetachDataDisksRequest - Specifies the input for attaching and detaching a list of managed data disks.
|
||||
type AttachDetachDataDisksRequest struct {
|
||||
// The list of managed data disks to be attached.
|
||||
DataDisksToAttach []*DataDisksToAttach
|
||||
|
||||
// The list of managed data disks to be detached.
|
||||
DataDisksToDetach []*DataDisksToDetach
|
||||
}
|
||||
|
||||
// AutomaticOSUpgradePolicy - The configuration parameters used for performing automatic OS upgrade.
|
||||
type AutomaticOSUpgradePolicy struct {
|
||||
// Whether OS image rollback feature should be disabled. Default value is false.
|
||||
|
|
@ -113,6 +122,11 @@ type AutomaticOSUpgradePolicy struct {
|
|||
// is automatically set to false and cannot be set to true.
|
||||
EnableAutomaticOSUpgrade *bool
|
||||
|
||||
// Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM
|
||||
// basis that an OS upgrade from rolling upgrades is incoming, via the IMDS
|
||||
// tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
|
||||
OSRollingUpgradeDeferral *bool
|
||||
|
||||
// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade
|
||||
// will fallback to the default policy if no policy is defined on the VMSS.
|
||||
UseRollingUpgradePolicy *bool
|
||||
|
|
@ -353,6 +367,10 @@ type CapacityReservationGroup struct {
|
|||
type CapacityReservationGroupInstanceView struct {
|
||||
// READ-ONLY; List of instance view of the capacity reservations under the capacity reservation group.
|
||||
CapacityReservations []*CapacityReservationInstanceViewWithName
|
||||
|
||||
// READ-ONLY; List of the subscriptions that the capacity reservation group is shared with. Note: Minimum api-version: 2023-09-01.
|
||||
// Please refer to https://aka.ms/computereservationsharing for more details.
|
||||
SharedSubscriptionIDs []*SubResourceReadOnly
|
||||
}
|
||||
|
||||
// CapacityReservationGroupListResult - The List capacity reservation group with resource group response.
|
||||
|
|
@ -367,6 +385,13 @@ type CapacityReservationGroupListResult struct {
|
|||
|
||||
// CapacityReservationGroupProperties - capacity reservation group Properties.
|
||||
type CapacityReservationGroupProperties struct {
|
||||
// Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. Pls. keep in
|
||||
// mind the capacity reservation group resource generally can be shared across
|
||||
// subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship established between
|
||||
// the AAD tenants. Note: Minimum api-version: 2023-09-01. Please refer to
|
||||
// https://aka.ms/computereservationsharing for more details.
|
||||
SharingProfile *ResourceSharingProfile
|
||||
|
||||
// READ-ONLY; A list of all capacity reservation resource ids that belong to capacity reservation group.
|
||||
CapacityReservations []*SubResourceReadOnly
|
||||
|
||||
|
|
@ -769,6 +794,9 @@ type CommunityGallery struct {
|
|||
// The identifier information of community gallery.
|
||||
Identifier *CommunityGalleryIdentifier
|
||||
|
||||
// Describes the properties of a community gallery.
|
||||
Properties *CommunityGalleryProperties
|
||||
|
||||
// READ-ONLY; Resource location
|
||||
Location *string
|
||||
|
||||
|
|
@ -820,7 +848,7 @@ type CommunityGalleryImageList struct {
|
|||
// REQUIRED; A list of community gallery images.
|
||||
Value []*CommunityGalleryImage
|
||||
|
||||
// The uri to fetch the next page of community gallery images. Call ListNext() with this to fetch the next page of community
|
||||
// The URI to fetch the next page of community gallery images. Call ListNext() with this to fetch the next page of community
|
||||
// gallery images.
|
||||
NextLink *string
|
||||
}
|
||||
|
|
@ -835,23 +863,26 @@ type CommunityGalleryImageProperties struct {
|
|||
OSState *OperatingSystemStateTypes
|
||||
|
||||
// REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
|
||||
// managed image.
|
||||
// Possible values are:
|
||||
// Windows
|
||||
// Linux
|
||||
// managed image. Possible values are: Windows, Linux.
|
||||
OSType *OperatingSystemTypes
|
||||
|
||||
// The architecture of the image. Applicable to OS disks only.
|
||||
Architecture *Architecture
|
||||
|
||||
// The artifact tags of a community gallery resource.
|
||||
ArtifactTags map[string]*string
|
||||
|
||||
// Describes the disallowed disk types.
|
||||
Disallowed *Disallowed
|
||||
|
||||
// The disclaimer for a community gallery resource.
|
||||
Disclaimer *string
|
||||
|
||||
// The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property
|
||||
// is updatable.
|
||||
EndOfLifeDate *time.Time
|
||||
|
||||
// End-user license agreement for the current community gallery image.
|
||||
// The end-user license agreement for the current community gallery image.
|
||||
Eula *string
|
||||
|
||||
// A list of gallery image features.
|
||||
|
|
@ -860,7 +891,7 @@ type CommunityGalleryImageProperties struct {
|
|||
// The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
|
||||
HyperVGeneration *HyperVGeneration
|
||||
|
||||
// Privacy statement uri for the current community gallery image.
|
||||
// Privacy statement URI for the current community gallery image.
|
||||
PrivacyStatementURI *string
|
||||
|
||||
// Describes the gallery image definition purchase plan. This is used by marketplace images.
|
||||
|
|
@ -893,13 +924,19 @@ type CommunityGalleryImageVersionList struct {
|
|||
// REQUIRED; A list of community gallery image versions.
|
||||
Value []*CommunityGalleryImageVersion
|
||||
|
||||
// The uri to fetch the next page of community gallery image versions. Call ListNext() with this to fetch the next page of
|
||||
// The URI to fetch the next page of community gallery image versions. Call ListNext() with this to fetch the next page of
|
||||
// community gallery image versions.
|
||||
NextLink *string
|
||||
}
|
||||
|
||||
// CommunityGalleryImageVersionProperties - Describes the properties of a gallery image version.
|
||||
type CommunityGalleryImageVersionProperties struct {
|
||||
// The artifact tags of a community gallery resource.
|
||||
ArtifactTags map[string]*string
|
||||
|
||||
// The disclaimer for a community gallery resource.
|
||||
Disclaimer *string
|
||||
|
||||
// The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This
|
||||
// property is updatable.
|
||||
EndOfLifeDate *time.Time
|
||||
|
|
@ -936,6 +973,36 @@ type CommunityGalleryInfo struct {
|
|||
PublicNames []*string
|
||||
}
|
||||
|
||||
// CommunityGalleryMetadata - The metadata of community gallery.
|
||||
type CommunityGalleryMetadata struct {
|
||||
// REQUIRED; A list of public names the gallery has.
|
||||
PublicNames []*string
|
||||
|
||||
// REQUIRED; The publisher email id of this community gallery.
|
||||
PublisherContact *string
|
||||
|
||||
// The end-user license agreement for this community gallery.
|
||||
Eula *string
|
||||
|
||||
// The link for the privacy statement of this community gallery from the gallery publisher.
|
||||
PrivacyStatementURI *string
|
||||
|
||||
// The publisher URI of this community gallery.
|
||||
PublisherURI *string
|
||||
}
|
||||
|
||||
// CommunityGalleryProperties - Describes the properties of a community gallery.
|
||||
type CommunityGalleryProperties struct {
|
||||
// The artifact tags of a community gallery resource.
|
||||
ArtifactTags map[string]*string
|
||||
|
||||
// The metadata of community gallery.
|
||||
CommunityMetadata *CommunityGalleryMetadata
|
||||
|
||||
// The disclaimer for a community gallery resource.
|
||||
Disclaimer *string
|
||||
}
|
||||
|
||||
// CopyCompletionError - Indicates the error details if the background copy of a resource created via the CopyStart operation
|
||||
// fails.
|
||||
type CopyCompletionError struct {
|
||||
|
|
@ -970,6 +1037,9 @@ type CreationData struct {
|
|||
// disabled after enabled.
|
||||
PerformancePlus *bool
|
||||
|
||||
// If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed.
|
||||
ProvisionedBandwidthCopySpeed *ProvisionedBandwidthCopyOption
|
||||
|
||||
// If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.
|
||||
SecurityDataURI *string
|
||||
|
||||
|
|
@ -1078,6 +1148,26 @@ type DataDiskImageEncryption struct {
|
|||
DiskEncryptionSetID *string
|
||||
}
|
||||
|
||||
// DataDisksToAttach - Describes the data disk to be attached.
|
||||
type DataDisksToAttach struct {
|
||||
// REQUIRED; ID of the managed data disk.
|
||||
DiskID *string
|
||||
|
||||
// The logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be
|
||||
// unique for each data disk attached to a VM. If not specified, lun would be auto
|
||||
// assigned.
|
||||
Lun *int32
|
||||
}
|
||||
|
||||
// DataDisksToDetach - Describes the data disk to be detached.
|
||||
type DataDisksToDetach struct {
|
||||
// REQUIRED; ID of the managed data disk.
|
||||
DiskID *string
|
||||
|
||||
// Supported options available for Detach of a disk from a VM. Refer to DetachOption object reference for more details.
|
||||
DetachOption *DiskDetachOptionTypes
|
||||
}
|
||||
|
||||
// DedicatedHost - Specifies information about the Dedicated host.
|
||||
type DedicatedHost struct {
|
||||
// REQUIRED; Resource location
|
||||
|
|
@ -1891,6 +1981,12 @@ type Encryption struct {
|
|||
Type *EncryptionType
|
||||
}
|
||||
|
||||
// EncryptionIdentity - Specifies the Managed Identity used by ADE to get access token for keyvault operations.
|
||||
type EncryptionIdentity struct {
|
||||
// Specifies ARM Resource ID of one of the user identities associated with the VM.
|
||||
UserAssignedIdentityResourceID *string
|
||||
}
|
||||
|
||||
// EncryptionImages - Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the
|
||||
// gallery artifact.
|
||||
type EncryptionImages struct {
|
||||
|
|
@ -2085,10 +2181,8 @@ type GalleryApplicationList struct {
|
|||
|
||||
// GalleryApplicationProperties - Describes the properties of a gallery Application Definition.
|
||||
type GalleryApplicationProperties struct {
|
||||
// REQUIRED; This property allows you to specify the supported type of the OS that application is built for.
|
||||
// Possible values are:
|
||||
// Windows
|
||||
// Linux
|
||||
// REQUIRED; This property allows you to specify the supported type of the OS that application is built for. Possible values
|
||||
// are: Windows, Linux.
|
||||
SupportedOSType *OperatingSystemTypes
|
||||
|
||||
// A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application.
|
||||
|
|
@ -2418,10 +2512,7 @@ type GalleryImageProperties struct {
|
|||
OSState *OperatingSystemStateTypes
|
||||
|
||||
// REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
|
||||
// managed image.
|
||||
// Possible values are:
|
||||
// Windows
|
||||
// Linux
|
||||
// managed image. Possible values are: Windows, Linux.
|
||||
OSType *OperatingSystemTypes
|
||||
|
||||
// The architecture of the image. Applicable to OS disks only.
|
||||
|
|
@ -2522,6 +2613,9 @@ type GalleryImageVersionProperties struct {
|
|||
// This is the safety profile of the Gallery Image Version.
|
||||
SafetyProfile *GalleryImageVersionSafetyProfile
|
||||
|
||||
// The security profile of a gallery image version
|
||||
SecurityProfile *ImageVersionSecurityProfile
|
||||
|
||||
// READ-ONLY; The provisioning state, which only appears in the response.
|
||||
ProvisioningState *GalleryProvisioningState
|
||||
|
||||
|
|
@ -2582,6 +2676,15 @@ type GalleryImageVersionStorageProfile struct {
|
|||
Source *GalleryArtifactVersionFullSource
|
||||
}
|
||||
|
||||
// GalleryImageVersionUefiSettings - Contains UEFI settings for the image version.
|
||||
type GalleryImageVersionUefiSettings struct {
|
||||
// Additional UEFI key signatures that will be added to the image in addition to the signature templates
|
||||
AdditionalSignatures *UefiKeySignatures
|
||||
|
||||
// The name of the template(s) that contains default UEFI key signatures that will be added to the image.
|
||||
SignatureTemplateNames []*UefiSignatureTemplateName
|
||||
}
|
||||
|
||||
// GalleryImageVersionUpdate - Specifies information about the gallery image version that you want to update.
|
||||
type GalleryImageVersionUpdate struct {
|
||||
// Describes the properties of a gallery image version.
|
||||
|
|
@ -2959,6 +3062,12 @@ type ImageUpdate struct {
|
|||
Tags map[string]*string
|
||||
}
|
||||
|
||||
// ImageVersionSecurityProfile - The security profile of a gallery image version
|
||||
type ImageVersionSecurityProfile struct {
|
||||
// Contains UEFI settings for the image version.
|
||||
UefiSettings *GalleryImageVersionUefiSettings
|
||||
}
|
||||
|
||||
// InnerError - Inner error details.
|
||||
type InnerError struct {
|
||||
// The internal error message or exception dump.
|
||||
|
|
@ -3722,7 +3831,7 @@ type PatchSettings struct {
|
|||
PatchMode *WindowsVMGuestPatchMode
|
||||
}
|
||||
|
||||
// PirCommunityGalleryResource - Base information about the community gallery resource in pir.
|
||||
// PirCommunityGalleryResource - Base information about the community gallery resource in azure compute gallery.
|
||||
type PirCommunityGalleryResource struct {
|
||||
// The identifier information of community gallery.
|
||||
Identifier *CommunityGalleryIdentifier
|
||||
|
|
@ -3961,6 +4070,21 @@ type ProximityPlacementGroupUpdate struct {
|
|||
Tags map[string]*string
|
||||
}
|
||||
|
||||
// ProxyAgentSettings - Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2023-09-01.
|
||||
type ProxyAgentSettings struct {
|
||||
// Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual machine scale set.
|
||||
Enabled *bool
|
||||
|
||||
// Increase the value of this property allows user to reset the key used for securing communication channel between guest
|
||||
// and host.
|
||||
KeyIncarnationID *int32
|
||||
|
||||
// Specifies the mode that ProxyAgent will execute on if the feature is enabled. ProxyAgent will start to audit or monitor
|
||||
// but not enforce access control over requests to host endpoints in Audit mode,
|
||||
// while in Enforce mode it will enforce access control. The default value is Enforce mode.
|
||||
Mode *Mode
|
||||
}
|
||||
|
||||
// ProxyOnlyResource - The ProxyOnly Resource model definition.
|
||||
type ProxyOnlyResource struct {
|
||||
// READ-ONLY; Resource Id
|
||||
|
|
@ -4093,6 +4217,27 @@ type RequestRateByIntervalInput struct {
|
|||
GroupByUserAgent *bool
|
||||
}
|
||||
|
||||
// ResiliencyPolicy - Describes an resiliency policy - resilientVMCreationPolicy and/or resilientVMDeletionPolicy.
|
||||
type ResiliencyPolicy struct {
|
||||
// The configuration parameters used while performing resilient VM creation.
|
||||
ResilientVMCreationPolicy *ResilientVMCreationPolicy
|
||||
|
||||
// The configuration parameters used while performing resilient VM deletion.
|
||||
ResilientVMDeletionPolicy *ResilientVMDeletionPolicy
|
||||
}
|
||||
|
||||
// ResilientVMCreationPolicy - The configuration parameters used while performing resilient VM creation.
|
||||
type ResilientVMCreationPolicy struct {
|
||||
// Specifies whether resilient VM creation should be enabled on the virtual machine scale set. The default value is false.
|
||||
Enabled *bool
|
||||
}
|
||||
|
||||
// ResilientVMDeletionPolicy - The configuration parameters used while performing resilient VM deletion.
|
||||
type ResilientVMDeletionPolicy struct {
|
||||
// Specifies whether resilient VM deletion should be enabled on the virtual machine scale set. The default value is false.
|
||||
Enabled *bool
|
||||
}
|
||||
|
||||
// Resource - The Resource model definition.
|
||||
type Resource struct {
|
||||
// REQUIRED; Resource location
|
||||
|
|
@ -4280,6 +4425,13 @@ type ResourceSKUsResult struct {
|
|||
NextLink *string
|
||||
}
|
||||
|
||||
type ResourceSharingProfile struct {
|
||||
// Specifies an array of subscription resource IDs that capacity reservation group is shared with. Note: Minimum api-version:
|
||||
// 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more
|
||||
// details.
|
||||
SubscriptionIDs []*SubResource
|
||||
}
|
||||
|
||||
// ResourceURIList - The List resources which are encrypted with the disk encryption set.
|
||||
type ResourceURIList struct {
|
||||
// REQUIRED; A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set.
|
||||
|
|
@ -4527,6 +4679,9 @@ type RestorePointSourceVMStorageProfile struct {
|
|||
|
||||
// Gets the OS disk of the VM captured at the time of the restore point creation.
|
||||
OSDisk *RestorePointSourceVMOSDisk
|
||||
|
||||
// READ-ONLY; Gets the disk controller type of the VM captured at the time of the restore point creation.
|
||||
DiskControllerType *DiskControllerTypes
|
||||
}
|
||||
|
||||
// RetrieveBootDiagnosticsDataResult - The SAS URIs of the console screenshot and serial log blobs.
|
||||
|
|
@ -4858,6 +5013,13 @@ type SSHConfiguration struct {
|
|||
PublicKeys []*SSHPublicKey
|
||||
}
|
||||
|
||||
// SSHGenerateKeyPairInputParameters - Parameters for GenerateSshKeyPair.
|
||||
type SSHGenerateKeyPairInputParameters struct {
|
||||
// The encryption type of the SSH keys to be generated. See SshEncryptionTypes for possible set of values. If not provided,
|
||||
// will default to RSA
|
||||
EncryptionType *SSHEncryptionTypes
|
||||
}
|
||||
|
||||
// SSHPublicKey - Contains information about SSH certificate public key and the path on the Linux VM where the public key
|
||||
// is placed.
|
||||
type SSHPublicKey struct {
|
||||
|
|
@ -4981,6 +5143,12 @@ type SecurityProfile struct {
|
|||
// property is set to true for the resource.
|
||||
EncryptionAtHost *bool
|
||||
|
||||
// Specifies the Managed Identity used by ADE to get access token for keyvault operations.
|
||||
EncryptionIdentity *EncryptionIdentity
|
||||
|
||||
// Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2023-09-01.
|
||||
ProxyAgentSettings *ProxyAgentSettings
|
||||
|
||||
// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The
|
||||
// default behavior is: UefiSettings will not be enabled unless this property is
|
||||
// set.
|
||||
|
|
@ -5009,6 +5177,9 @@ type SharedGallery struct {
|
|||
// The identifier information of shared gallery.
|
||||
Identifier *SharedGalleryIdentifier
|
||||
|
||||
// Specifies the properties of a shared gallery
|
||||
Properties *SharedGalleryProperties
|
||||
|
||||
// READ-ONLY; Resource location
|
||||
Location *string
|
||||
|
||||
|
|
@ -5080,15 +5251,15 @@ type SharedGalleryImageProperties struct {
|
|||
OSState *OperatingSystemStateTypes
|
||||
|
||||
// REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
|
||||
// managed image.
|
||||
// Possible values are:
|
||||
// Windows
|
||||
// Linux
|
||||
// managed image. Possible values are: Windows, Linux.
|
||||
OSType *OperatingSystemTypes
|
||||
|
||||
// The architecture of the image. Applicable to OS disks only.
|
||||
Architecture *Architecture
|
||||
|
||||
// The artifact tags of a shared gallery resource.
|
||||
ArtifactTags map[string]*string
|
||||
|
||||
// Describes the disallowed disk types.
|
||||
Disallowed *Disallowed
|
||||
|
||||
|
|
@ -5142,6 +5313,9 @@ type SharedGalleryImageVersionList struct {
|
|||
|
||||
// SharedGalleryImageVersionProperties - Describes the properties of a gallery image version.
|
||||
type SharedGalleryImageVersionProperties struct {
|
||||
// The artifact tags of a shared gallery resource.
|
||||
ArtifactTags map[string]*string
|
||||
|
||||
// The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This
|
||||
// property is updatable.
|
||||
EndOfLifeDate *time.Time
|
||||
|
|
@ -5184,16 +5358,18 @@ type SharedGalleryOSDiskImage struct {
|
|||
DiskSizeGB *int32
|
||||
}
|
||||
|
||||
// SharedGalleryProperties - Specifies the properties of a shared gallery
|
||||
type SharedGalleryProperties struct {
|
||||
// READ-ONLY; The artifact tags of a shared gallery resource.
|
||||
ArtifactTags map[string]*string
|
||||
}
|
||||
|
||||
// SharingProfile - Profile for gallery sharing to subscription or tenant
|
||||
type SharingProfile struct {
|
||||
// Information of community gallery if current gallery is shared to community.
|
||||
CommunityGalleryInfo *CommunityGalleryInfo
|
||||
|
||||
// This property allows you to specify the permission of sharing gallery.
|
||||
// Possible values are:
|
||||
// Private
|
||||
// Groups
|
||||
// Community
|
||||
// This property allows you to specify the permission of sharing gallery. Possible values are: Private, Groups, Community.
|
||||
Permissions *GallerySharingPermissionTypes
|
||||
|
||||
// READ-ONLY; A list of sharing profile groups.
|
||||
|
|
@ -5205,10 +5381,7 @@ type SharingProfileGroup struct {
|
|||
// A list of subscription/tenant ids the gallery is aimed to be shared to.
|
||||
IDs []*string
|
||||
|
||||
// This property allows you to specify the type of sharing group.
|
||||
// Possible values are:
|
||||
// Subscriptions
|
||||
// AADTenants
|
||||
// This property allows you to specify the type of sharing group. Possible values are: Subscriptions, AADTenants.
|
||||
Type *SharingProfileGroupTypes
|
||||
}
|
||||
|
||||
|
|
@ -5223,11 +5396,8 @@ type SharingStatus struct {
|
|||
|
||||
// SharingUpdate - Specifies information about the gallery sharing profile update.
|
||||
type SharingUpdate struct {
|
||||
// REQUIRED; This property allows you to specify the operation type of gallery sharing update.
|
||||
// Possible values are:
|
||||
// Add
|
||||
// Remove
|
||||
// Reset
|
||||
// REQUIRED; This property allows you to specify the operation type of gallery sharing update. Possible values are: Add, Remove,
|
||||
// Reset.
|
||||
OperationType *SharingUpdateOperationTypes
|
||||
|
||||
// A list of sharing profile groups.
|
||||
|
|
@ -5566,6 +5736,30 @@ type ThrottledRequestsInput struct {
|
|||
GroupByUserAgent *bool
|
||||
}
|
||||
|
||||
// UefiKey - A UEFI key signature.
|
||||
type UefiKey struct {
|
||||
// The type of key signature.
|
||||
Type *UefiKeyType
|
||||
|
||||
// The value of the key signature.
|
||||
Value []*string
|
||||
}
|
||||
|
||||
// UefiKeySignatures - Additional UEFI key signatures that will be added to the image in addition to the signature templates
|
||||
type UefiKeySignatures struct {
|
||||
// The database of UEFI keys for this image version.
|
||||
Db []*UefiKey
|
||||
|
||||
// The database of revoked UEFI keys for this image version.
|
||||
Dbx []*UefiKey
|
||||
|
||||
// The Key Encryption Keys of this image version.
|
||||
Kek []*UefiKey
|
||||
|
||||
// The Platform Key of this image version.
|
||||
Pk *UefiKey
|
||||
}
|
||||
|
||||
// UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum
|
||||
// api-version: 2020-12-01.
|
||||
type UefiSettings struct {
|
||||
|
|
@ -5752,8 +5946,9 @@ type VMDiskSecurityProfile struct {
|
|||
DiskEncryptionSet *DiskEncryptionSetParameters
|
||||
|
||||
// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk
|
||||
// along with VMGuestState blob, and VMGuestStateOnly for encryption of just the
|
||||
// VMGuestState blob. Note: It can be set for only Confidential VMs.
|
||||
// along with VMGuestState blob, VMGuestStateOnly for encryption of just the
|
||||
// VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob.. Note: It can be set
|
||||
// for only Confidential VMs.
|
||||
SecurityEncryptionType *SecurityEncryptionTypes
|
||||
}
|
||||
|
||||
|
|
@ -5879,9 +6074,17 @@ type VirtualMachine struct {
|
|||
// The virtual machine zones.
|
||||
Zones []*string
|
||||
|
||||
// READ-ONLY; Etag is property returned in Create/Update/Get response of the VM, so that customer can supply it in the header
|
||||
// to ensure optimistic updates.
|
||||
Etag *string
|
||||
|
||||
// READ-ONLY; Resource Id
|
||||
ID *string
|
||||
|
||||
// READ-ONLY; ManagedBy is set to Virtual Machine Scale Set(VMSS) flex ARM resourceID, if the VM is part of the VMSS. This
|
||||
// property is used by platform for internal resource group delete optimization.
|
||||
ManagedBy *string
|
||||
|
||||
// READ-ONLY; Resource name
|
||||
Name *string
|
||||
|
||||
|
|
@ -6377,6 +6580,9 @@ type VirtualMachineInstanceView struct {
|
|||
// placement enabled. Minimum api-version: 2020-06-01.
|
||||
AssignedHost *string
|
||||
|
||||
// READ-ONLY; [Preview Feature] Specifies whether the VM is currently in or out of the Standby Pool.
|
||||
IsVMInStandbyPool *bool
|
||||
|
||||
// READ-ONLY; The health status for the VM.
|
||||
VMHealth *VirtualMachineHealthStatus
|
||||
}
|
||||
|
|
@ -6857,6 +7063,10 @@ type VirtualMachineScaleSet struct {
|
|||
// The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
|
||||
Zones []*string
|
||||
|
||||
// READ-ONLY; Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header
|
||||
// to ensure optimistic updates
|
||||
Etag *string
|
||||
|
||||
// READ-ONLY; Resource Id
|
||||
ID *string
|
||||
|
||||
|
|
@ -7376,6 +7586,9 @@ type VirtualMachineScaleSetProperties struct {
|
|||
// api-version: 2018-04-01.
|
||||
ProximityPlacementGroup *SubResource
|
||||
|
||||
// Policy for Resiliency
|
||||
ResiliencyPolicy *ResiliencyPolicy
|
||||
|
||||
// Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
|
||||
ScaleInPolicy *ScaleInPolicy
|
||||
|
||||
|
|
@ -7716,6 +7929,9 @@ type VirtualMachineScaleSetUpdateProperties struct {
|
|||
// Minimum api-version: 2018-04-01.
|
||||
ProximityPlacementGroup *SubResource
|
||||
|
||||
// Policy for Resiliency
|
||||
ResiliencyPolicy *ResiliencyPolicy
|
||||
|
||||
// Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
|
||||
ScaleInPolicy *ScaleInPolicy
|
||||
|
||||
|
|
@ -7831,6 +8047,10 @@ type VirtualMachineScaleSetVM struct {
|
|||
// Resource tags
|
||||
Tags map[string]*string
|
||||
|
||||
// READ-ONLY; Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header
|
||||
// to ensure optimistic updates.
|
||||
Etag *string
|
||||
|
||||
// READ-ONLY; Resource Id
|
||||
ID *string
|
||||
|
||||
|
|
@ -8055,6 +8275,11 @@ type VirtualMachineScaleSetVMProfile struct {
|
|||
// UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets
|
||||
// in here. Minimum api-version: 2021-03-01.
|
||||
UserData *string
|
||||
|
||||
// READ-ONLY; Specifies the time in which this VM profile for the Virtual Machine Scale Set was created. Minimum API version
|
||||
// for this property is 2023-09-01. This value will be added to VMSS Flex VM tags when
|
||||
// creating/updating the VMSS VM Profile with minimum api-version 2023-09-01.
|
||||
TimeCreated *time.Time
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetVMProperties - Describes the properties of a virtual machine scale set virtual machine.
|
||||
|
|
|
|||
|
|
@ -279,11 +279,43 @@ func (a *ApplicationProfile) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type AttachDetachDataDisksRequest.
|
||||
func (a AttachDetachDataDisksRequest) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "dataDisksToAttach", a.DataDisksToAttach)
|
||||
populate(objectMap, "dataDisksToDetach", a.DataDisksToDetach)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type AttachDetachDataDisksRequest.
|
||||
func (a *AttachDetachDataDisksRequest) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", a, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "dataDisksToAttach":
|
||||
err = unpopulate(val, "DataDisksToAttach", &a.DataDisksToAttach)
|
||||
delete(rawMsg, key)
|
||||
case "dataDisksToDetach":
|
||||
err = unpopulate(val, "DataDisksToDetach", &a.DataDisksToDetach)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", a, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type AutomaticOSUpgradePolicy.
|
||||
func (a AutomaticOSUpgradePolicy) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "disableAutomaticRollback", a.DisableAutomaticRollback)
|
||||
populate(objectMap, "enableAutomaticOSUpgrade", a.EnableAutomaticOSUpgrade)
|
||||
populate(objectMap, "osRollingUpgradeDeferral", a.OSRollingUpgradeDeferral)
|
||||
populate(objectMap, "useRollingUpgradePolicy", a.UseRollingUpgradePolicy)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
|
@ -303,6 +335,9 @@ func (a *AutomaticOSUpgradePolicy) UnmarshalJSON(data []byte) error {
|
|||
case "enableAutomaticOSUpgrade":
|
||||
err = unpopulate(val, "EnableAutomaticOSUpgrade", &a.EnableAutomaticOSUpgrade)
|
||||
delete(rawMsg, key)
|
||||
case "osRollingUpgradeDeferral":
|
||||
err = unpopulate(val, "OSRollingUpgradeDeferral", &a.OSRollingUpgradeDeferral)
|
||||
delete(rawMsg, key)
|
||||
case "useRollingUpgradePolicy":
|
||||
err = unpopulate(val, "UseRollingUpgradePolicy", &a.UseRollingUpgradePolicy)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -794,6 +829,7 @@ func (c *CapacityReservationGroup) UnmarshalJSON(data []byte) error {
|
|||
func (c CapacityReservationGroupInstanceView) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "capacityReservations", c.CapacityReservations)
|
||||
populate(objectMap, "sharedSubscriptionIds", c.SharedSubscriptionIDs)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
|
|
@ -809,6 +845,9 @@ func (c *CapacityReservationGroupInstanceView) UnmarshalJSON(data []byte) error
|
|||
case "capacityReservations":
|
||||
err = unpopulate(val, "CapacityReservations", &c.CapacityReservations)
|
||||
delete(rawMsg, key)
|
||||
case "sharedSubscriptionIds":
|
||||
err = unpopulate(val, "SharedSubscriptionIDs", &c.SharedSubscriptionIDs)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", c, err)
|
||||
|
|
@ -853,6 +892,7 @@ func (c CapacityReservationGroupProperties) MarshalJSON() ([]byte, error) {
|
|||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "capacityReservations", c.CapacityReservations)
|
||||
populate(objectMap, "instanceView", c.InstanceView)
|
||||
populate(objectMap, "sharingProfile", c.SharingProfile)
|
||||
populate(objectMap, "virtualMachinesAssociated", c.VirtualMachinesAssociated)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
|
@ -872,6 +912,9 @@ func (c *CapacityReservationGroupProperties) UnmarshalJSON(data []byte) error {
|
|||
case "instanceView":
|
||||
err = unpopulate(val, "InstanceView", &c.InstanceView)
|
||||
delete(rawMsg, key)
|
||||
case "sharingProfile":
|
||||
err = unpopulate(val, "SharingProfile", &c.SharingProfile)
|
||||
delete(rawMsg, key)
|
||||
case "virtualMachinesAssociated":
|
||||
err = unpopulate(val, "VirtualMachinesAssociated", &c.VirtualMachinesAssociated)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -1823,6 +1866,7 @@ func (c CommunityGallery) MarshalJSON() ([]byte, error) {
|
|||
populate(objectMap, "identifier", c.Identifier)
|
||||
populate(objectMap, "location", c.Location)
|
||||
populate(objectMap, "name", c.Name)
|
||||
populate(objectMap, "properties", c.Properties)
|
||||
populate(objectMap, "type", c.Type)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
|
@ -1845,6 +1889,9 @@ func (c *CommunityGallery) UnmarshalJSON(data []byte) error {
|
|||
case "name":
|
||||
err = unpopulate(val, "Name", &c.Name)
|
||||
delete(rawMsg, key)
|
||||
case "properties":
|
||||
err = unpopulate(val, "Properties", &c.Properties)
|
||||
delete(rawMsg, key)
|
||||
case "type":
|
||||
err = unpopulate(val, "Type", &c.Type)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -1996,7 +2043,9 @@ func (c *CommunityGalleryImageList) UnmarshalJSON(data []byte) error {
|
|||
func (c CommunityGalleryImageProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "architecture", c.Architecture)
|
||||
populate(objectMap, "artifactTags", c.ArtifactTags)
|
||||
populate(objectMap, "disallowed", c.Disallowed)
|
||||
populate(objectMap, "disclaimer", c.Disclaimer)
|
||||
populateDateTimeRFC3339(objectMap, "endOfLifeDate", c.EndOfLifeDate)
|
||||
populate(objectMap, "eula", c.Eula)
|
||||
populate(objectMap, "features", c.Features)
|
||||
|
|
@ -2022,9 +2071,15 @@ func (c *CommunityGalleryImageProperties) UnmarshalJSON(data []byte) error {
|
|||
case "architecture":
|
||||
err = unpopulate(val, "Architecture", &c.Architecture)
|
||||
delete(rawMsg, key)
|
||||
case "artifactTags":
|
||||
err = unpopulate(val, "ArtifactTags", &c.ArtifactTags)
|
||||
delete(rawMsg, key)
|
||||
case "disallowed":
|
||||
err = unpopulate(val, "Disallowed", &c.Disallowed)
|
||||
delete(rawMsg, key)
|
||||
case "disclaimer":
|
||||
err = unpopulate(val, "Disclaimer", &c.Disclaimer)
|
||||
delete(rawMsg, key)
|
||||
case "endOfLifeDate":
|
||||
err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &c.EndOfLifeDate)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -2140,6 +2195,8 @@ func (c *CommunityGalleryImageVersionList) UnmarshalJSON(data []byte) error {
|
|||
// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryImageVersionProperties.
|
||||
func (c CommunityGalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "artifactTags", c.ArtifactTags)
|
||||
populate(objectMap, "disclaimer", c.Disclaimer)
|
||||
populateDateTimeRFC3339(objectMap, "endOfLifeDate", c.EndOfLifeDate)
|
||||
populate(objectMap, "excludeFromLatest", c.ExcludeFromLatest)
|
||||
populateDateTimeRFC3339(objectMap, "publishedDate", c.PublishedDate)
|
||||
|
|
@ -2156,6 +2213,12 @@ func (c *CommunityGalleryImageVersionProperties) UnmarshalJSON(data []byte) erro
|
|||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "artifactTags":
|
||||
err = unpopulate(val, "ArtifactTags", &c.ArtifactTags)
|
||||
delete(rawMsg, key)
|
||||
case "disclaimer":
|
||||
err = unpopulate(val, "Disclaimer", &c.Disclaimer)
|
||||
delete(rawMsg, key)
|
||||
case "endOfLifeDate":
|
||||
err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &c.EndOfLifeDate)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -2223,6 +2286,84 @@ func (c *CommunityGalleryInfo) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryMetadata.
|
||||
func (c CommunityGalleryMetadata) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "eula", c.Eula)
|
||||
populate(objectMap, "privacyStatementUri", c.PrivacyStatementURI)
|
||||
populate(objectMap, "publicNames", c.PublicNames)
|
||||
populate(objectMap, "publisherContact", c.PublisherContact)
|
||||
populate(objectMap, "publisherUri", c.PublisherURI)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryMetadata.
|
||||
func (c *CommunityGalleryMetadata) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", c, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "eula":
|
||||
err = unpopulate(val, "Eula", &c.Eula)
|
||||
delete(rawMsg, key)
|
||||
case "privacyStatementUri":
|
||||
err = unpopulate(val, "PrivacyStatementURI", &c.PrivacyStatementURI)
|
||||
delete(rawMsg, key)
|
||||
case "publicNames":
|
||||
err = unpopulate(val, "PublicNames", &c.PublicNames)
|
||||
delete(rawMsg, key)
|
||||
case "publisherContact":
|
||||
err = unpopulate(val, "PublisherContact", &c.PublisherContact)
|
||||
delete(rawMsg, key)
|
||||
case "publisherUri":
|
||||
err = unpopulate(val, "PublisherURI", &c.PublisherURI)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", c, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryProperties.
|
||||
func (c CommunityGalleryProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "artifactTags", c.ArtifactTags)
|
||||
populate(objectMap, "communityMetadata", c.CommunityMetadata)
|
||||
populate(objectMap, "disclaimer", c.Disclaimer)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryProperties.
|
||||
func (c *CommunityGalleryProperties) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", c, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "artifactTags":
|
||||
err = unpopulate(val, "ArtifactTags", &c.ArtifactTags)
|
||||
delete(rawMsg, key)
|
||||
case "communityMetadata":
|
||||
err = unpopulate(val, "CommunityMetadata", &c.CommunityMetadata)
|
||||
delete(rawMsg, key)
|
||||
case "disclaimer":
|
||||
err = unpopulate(val, "Disclaimer", &c.Disclaimer)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", c, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type CopyCompletionError.
|
||||
func (c CopyCompletionError) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -2263,6 +2404,7 @@ func (c CreationData) MarshalJSON() ([]byte, error) {
|
|||
populate(objectMap, "imageReference", c.ImageReference)
|
||||
populate(objectMap, "logicalSectorSize", c.LogicalSectorSize)
|
||||
populate(objectMap, "performancePlus", c.PerformancePlus)
|
||||
populate(objectMap, "provisionedBandwidthCopySpeed", c.ProvisionedBandwidthCopySpeed)
|
||||
populate(objectMap, "securityDataUri", c.SecurityDataURI)
|
||||
populate(objectMap, "sourceResourceId", c.SourceResourceID)
|
||||
populate(objectMap, "sourceUri", c.SourceURI)
|
||||
|
|
@ -2299,6 +2441,9 @@ func (c *CreationData) UnmarshalJSON(data []byte) error {
|
|||
case "performancePlus":
|
||||
err = unpopulate(val, "PerformancePlus", &c.PerformancePlus)
|
||||
delete(rawMsg, key)
|
||||
case "provisionedBandwidthCopySpeed":
|
||||
err = unpopulate(val, "ProvisionedBandwidthCopySpeed", &c.ProvisionedBandwidthCopySpeed)
|
||||
delete(rawMsg, key)
|
||||
case "securityDataUri":
|
||||
err = unpopulate(val, "SecurityDataURI", &c.SecurityDataURI)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -2462,6 +2607,68 @@ func (d *DataDiskImageEncryption) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type DataDisksToAttach.
|
||||
func (d DataDisksToAttach) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "diskId", d.DiskID)
|
||||
populate(objectMap, "lun", d.Lun)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type DataDisksToAttach.
|
||||
func (d *DataDisksToAttach) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", d, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "diskId":
|
||||
err = unpopulate(val, "DiskID", &d.DiskID)
|
||||
delete(rawMsg, key)
|
||||
case "lun":
|
||||
err = unpopulate(val, "Lun", &d.Lun)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", d, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type DataDisksToDetach.
|
||||
func (d DataDisksToDetach) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "detachOption", d.DetachOption)
|
||||
populate(objectMap, "diskId", d.DiskID)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type DataDisksToDetach.
|
||||
func (d *DataDisksToDetach) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", d, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "detachOption":
|
||||
err = unpopulate(val, "DetachOption", &d.DetachOption)
|
||||
delete(rawMsg, key)
|
||||
case "diskId":
|
||||
err = unpopulate(val, "DiskID", &d.DiskID)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", d, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type DedicatedHost.
|
||||
func (d DedicatedHost) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -4324,6 +4531,33 @@ func (e *Encryption) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type EncryptionIdentity.
|
||||
func (e EncryptionIdentity) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "userAssignedIdentityResourceId", e.UserAssignedIdentityResourceID)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionIdentity.
|
||||
func (e *EncryptionIdentity) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", e, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "userAssignedIdentityResourceId":
|
||||
err = unpopulate(val, "UserAssignedIdentityResourceID", &e.UserAssignedIdentityResourceID)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", e, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type EncryptionImages.
|
||||
func (e EncryptionImages) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -5833,6 +6067,7 @@ func (g GalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
|
|||
populate(objectMap, "publishingProfile", g.PublishingProfile)
|
||||
populate(objectMap, "replicationStatus", g.ReplicationStatus)
|
||||
populate(objectMap, "safetyProfile", g.SafetyProfile)
|
||||
populate(objectMap, "securityProfile", g.SecurityProfile)
|
||||
populate(objectMap, "storageProfile", g.StorageProfile)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
|
@ -5858,6 +6093,9 @@ func (g *GalleryImageVersionProperties) UnmarshalJSON(data []byte) error {
|
|||
case "safetyProfile":
|
||||
err = unpopulate(val, "SafetyProfile", &g.SafetyProfile)
|
||||
delete(rawMsg, key)
|
||||
case "securityProfile":
|
||||
err = unpopulate(val, "SecurityProfile", &g.SecurityProfile)
|
||||
delete(rawMsg, key)
|
||||
case "storageProfile":
|
||||
err = unpopulate(val, "StorageProfile", &g.StorageProfile)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -5994,6 +6232,37 @@ func (g *GalleryImageVersionStorageProfile) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionUefiSettings.
|
||||
func (g GalleryImageVersionUefiSettings) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "additionalSignatures", g.AdditionalSignatures)
|
||||
populate(objectMap, "signatureTemplateNames", g.SignatureTemplateNames)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionUefiSettings.
|
||||
func (g *GalleryImageVersionUefiSettings) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", g, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "additionalSignatures":
|
||||
err = unpopulate(val, "AdditionalSignatures", &g.AdditionalSignatures)
|
||||
delete(rawMsg, key)
|
||||
case "signatureTemplateNames":
|
||||
err = unpopulate(val, "SignatureTemplateNames", &g.SignatureTemplateNames)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", g, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionUpdate.
|
||||
func (g GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -6822,6 +7091,33 @@ func (i *ImageUpdate) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type ImageVersionSecurityProfile.
|
||||
func (i ImageVersionSecurityProfile) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "uefiSettings", i.UefiSettings)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type ImageVersionSecurityProfile.
|
||||
func (i *ImageVersionSecurityProfile) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", i, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "uefiSettings":
|
||||
err = unpopulate(val, "UefiSettings", &i.UefiSettings)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", i, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type InnerError.
|
||||
func (i InnerError) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -9320,6 +9616,41 @@ func (p *ProximityPlacementGroupUpdate) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type ProxyAgentSettings.
|
||||
func (p ProxyAgentSettings) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "enabled", p.Enabled)
|
||||
populate(objectMap, "keyIncarnationId", p.KeyIncarnationID)
|
||||
populate(objectMap, "mode", p.Mode)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyAgentSettings.
|
||||
func (p *ProxyAgentSettings) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", p, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "enabled":
|
||||
err = unpopulate(val, "Enabled", &p.Enabled)
|
||||
delete(rawMsg, key)
|
||||
case "keyIncarnationId":
|
||||
err = unpopulate(val, "KeyIncarnationID", &p.KeyIncarnationID)
|
||||
delete(rawMsg, key)
|
||||
case "mode":
|
||||
err = unpopulate(val, "Mode", &p.Mode)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", p, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type ProxyOnlyResource.
|
||||
func (p ProxyOnlyResource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -9682,6 +10013,91 @@ func (r *RequestRateByIntervalInput) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type ResiliencyPolicy.
|
||||
func (r ResiliencyPolicy) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "resilientVMCreationPolicy", r.ResilientVMCreationPolicy)
|
||||
populate(objectMap, "resilientVMDeletionPolicy", r.ResilientVMDeletionPolicy)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type ResiliencyPolicy.
|
||||
func (r *ResiliencyPolicy) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", r, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "resilientVMCreationPolicy":
|
||||
err = unpopulate(val, "ResilientVMCreationPolicy", &r.ResilientVMCreationPolicy)
|
||||
delete(rawMsg, key)
|
||||
case "resilientVMDeletionPolicy":
|
||||
err = unpopulate(val, "ResilientVMDeletionPolicy", &r.ResilientVMDeletionPolicy)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", r, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type ResilientVMCreationPolicy.
|
||||
func (r ResilientVMCreationPolicy) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "enabled", r.Enabled)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type ResilientVMCreationPolicy.
|
||||
func (r *ResilientVMCreationPolicy) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", r, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "enabled":
|
||||
err = unpopulate(val, "Enabled", &r.Enabled)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", r, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type ResilientVMDeletionPolicy.
|
||||
func (r ResilientVMDeletionPolicy) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "enabled", r.Enabled)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type ResilientVMDeletionPolicy.
|
||||
func (r *ResilientVMDeletionPolicy) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", r, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "enabled":
|
||||
err = unpopulate(val, "Enabled", &r.Enabled)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", r, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type Resource.
|
||||
func (r Resource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -10154,6 +10570,33 @@ func (r *ResourceSKUsResult) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type ResourceSharingProfile.
|
||||
func (r ResourceSharingProfile) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "subscriptionIds", r.SubscriptionIDs)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSharingProfile.
|
||||
func (r *ResourceSharingProfile) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", r, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "subscriptionIds":
|
||||
err = unpopulate(val, "SubscriptionIDs", &r.SubscriptionIDs)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", r, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type ResourceURIList.
|
||||
func (r ResourceURIList) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -10732,6 +11175,7 @@ func (r *RestorePointSourceVMOSDisk) UnmarshalJSON(data []byte) error {
|
|||
func (r RestorePointSourceVMStorageProfile) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "dataDisks", r.DataDisks)
|
||||
populate(objectMap, "diskControllerType", r.DiskControllerType)
|
||||
populate(objectMap, "osDisk", r.OSDisk)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
|
@ -10748,6 +11192,9 @@ func (r *RestorePointSourceVMStorageProfile) UnmarshalJSON(data []byte) error {
|
|||
case "dataDisks":
|
||||
err = unpopulate(val, "DataDisks", &r.DataDisks)
|
||||
delete(rawMsg, key)
|
||||
case "diskControllerType":
|
||||
err = unpopulate(val, "DiskControllerType", &r.DiskControllerType)
|
||||
delete(rawMsg, key)
|
||||
case "osDisk":
|
||||
err = unpopulate(val, "OSDisk", &r.OSDisk)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -11600,6 +12047,33 @@ func (s *SSHConfiguration) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type SSHGenerateKeyPairInputParameters.
|
||||
func (s SSHGenerateKeyPairInputParameters) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "encryptionType", s.EncryptionType)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type SSHGenerateKeyPairInputParameters.
|
||||
func (s *SSHGenerateKeyPairInputParameters) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", s, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "encryptionType":
|
||||
err = unpopulate(val, "EncryptionType", &s.EncryptionType)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", s, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.
|
||||
func (s SSHPublicKey) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -11899,6 +12373,8 @@ func (s *SecurityPostureReference) UnmarshalJSON(data []byte) error {
|
|||
func (s SecurityProfile) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "encryptionAtHost", s.EncryptionAtHost)
|
||||
populate(objectMap, "encryptionIdentity", s.EncryptionIdentity)
|
||||
populate(objectMap, "proxyAgentSettings", s.ProxyAgentSettings)
|
||||
populate(objectMap, "securityType", s.SecurityType)
|
||||
populate(objectMap, "uefiSettings", s.UefiSettings)
|
||||
return json.Marshal(objectMap)
|
||||
|
|
@ -11916,6 +12392,12 @@ func (s *SecurityProfile) UnmarshalJSON(data []byte) error {
|
|||
case "encryptionAtHost":
|
||||
err = unpopulate(val, "EncryptionAtHost", &s.EncryptionAtHost)
|
||||
delete(rawMsg, key)
|
||||
case "encryptionIdentity":
|
||||
err = unpopulate(val, "EncryptionIdentity", &s.EncryptionIdentity)
|
||||
delete(rawMsg, key)
|
||||
case "proxyAgentSettings":
|
||||
err = unpopulate(val, "ProxyAgentSettings", &s.ProxyAgentSettings)
|
||||
delete(rawMsg, key)
|
||||
case "securityType":
|
||||
err = unpopulate(val, "SecurityType", &s.SecurityType)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -11990,6 +12472,7 @@ func (s SharedGallery) MarshalJSON() ([]byte, error) {
|
|||
populate(objectMap, "identifier", s.Identifier)
|
||||
populate(objectMap, "location", s.Location)
|
||||
populate(objectMap, "name", s.Name)
|
||||
populate(objectMap, "properties", s.Properties)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
|
|
@ -12011,6 +12494,9 @@ func (s *SharedGallery) UnmarshalJSON(data []byte) error {
|
|||
case "name":
|
||||
err = unpopulate(val, "Name", &s.Name)
|
||||
delete(rawMsg, key)
|
||||
case "properties":
|
||||
err = unpopulate(val, "Properties", &s.Properties)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", s, err)
|
||||
|
|
@ -12186,6 +12672,7 @@ func (s *SharedGalleryImageList) UnmarshalJSON(data []byte) error {
|
|||
func (s SharedGalleryImageProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "architecture", s.Architecture)
|
||||
populate(objectMap, "artifactTags", s.ArtifactTags)
|
||||
populate(objectMap, "disallowed", s.Disallowed)
|
||||
populateDateTimeRFC3339(objectMap, "endOfLifeDate", s.EndOfLifeDate)
|
||||
populate(objectMap, "eula", s.Eula)
|
||||
|
|
@ -12212,6 +12699,9 @@ func (s *SharedGalleryImageProperties) UnmarshalJSON(data []byte) error {
|
|||
case "architecture":
|
||||
err = unpopulate(val, "Architecture", &s.Architecture)
|
||||
delete(rawMsg, key)
|
||||
case "artifactTags":
|
||||
err = unpopulate(val, "ArtifactTags", &s.ArtifactTags)
|
||||
delete(rawMsg, key)
|
||||
case "disallowed":
|
||||
err = unpopulate(val, "Disallowed", &s.Disallowed)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -12326,6 +12816,7 @@ func (s *SharedGalleryImageVersionList) UnmarshalJSON(data []byte) error {
|
|||
// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageVersionProperties.
|
||||
func (s SharedGalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "artifactTags", s.ArtifactTags)
|
||||
populateDateTimeRFC3339(objectMap, "endOfLifeDate", s.EndOfLifeDate)
|
||||
populate(objectMap, "excludeFromLatest", s.ExcludeFromLatest)
|
||||
populateDateTimeRFC3339(objectMap, "publishedDate", s.PublishedDate)
|
||||
|
|
@ -12342,6 +12833,9 @@ func (s *SharedGalleryImageVersionProperties) UnmarshalJSON(data []byte) error {
|
|||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "artifactTags":
|
||||
err = unpopulate(val, "ArtifactTags", &s.ArtifactTags)
|
||||
delete(rawMsg, key)
|
||||
case "endOfLifeDate":
|
||||
err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &s.EndOfLifeDate)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -12455,6 +12949,33 @@ func (s *SharedGalleryOSDiskImage) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type SharedGalleryProperties.
|
||||
func (s SharedGalleryProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "artifactTags", s.ArtifactTags)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryProperties.
|
||||
func (s *SharedGalleryProperties) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", s, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "artifactTags":
|
||||
err = unpopulate(val, "ArtifactTags", &s.ArtifactTags)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", s, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type SharingProfile.
|
||||
func (s SharingProfile) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -13352,6 +13873,76 @@ func (t *ThrottledRequestsInput) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type UefiKey.
|
||||
func (u UefiKey) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "type", u.Type)
|
||||
populate(objectMap, "value", u.Value)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type UefiKey.
|
||||
func (u *UefiKey) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", u, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "type":
|
||||
err = unpopulate(val, "Type", &u.Type)
|
||||
delete(rawMsg, key)
|
||||
case "value":
|
||||
err = unpopulate(val, "Value", &u.Value)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", u, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type UefiKeySignatures.
|
||||
func (u UefiKeySignatures) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "db", u.Db)
|
||||
populate(objectMap, "dbx", u.Dbx)
|
||||
populate(objectMap, "kek", u.Kek)
|
||||
populate(objectMap, "pk", u.Pk)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaller interface for type UefiKeySignatures.
|
||||
func (u *UefiKeySignatures) UnmarshalJSON(data []byte) error {
|
||||
var rawMsg map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawMsg); err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", u, err)
|
||||
}
|
||||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "db":
|
||||
err = unpopulate(val, "Db", &u.Db)
|
||||
delete(rawMsg, key)
|
||||
case "dbx":
|
||||
err = unpopulate(val, "Dbx", &u.Dbx)
|
||||
delete(rawMsg, key)
|
||||
case "kek":
|
||||
err = unpopulate(val, "Kek", &u.Kek)
|
||||
delete(rawMsg, key)
|
||||
case "pk":
|
||||
err = unpopulate(val, "Pk", &u.Pk)
|
||||
delete(rawMsg, key)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("unmarshalling type %T: %v", u, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaller interface for type UefiSettings.
|
||||
func (u UefiSettings) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
|
|
@ -14120,10 +14711,12 @@ func (v *VirtualHardDisk) UnmarshalJSON(data []byte) error {
|
|||
// MarshalJSON implements the json.Marshaller interface for type VirtualMachine.
|
||||
func (v VirtualMachine) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "etag", v.Etag)
|
||||
populate(objectMap, "extendedLocation", v.ExtendedLocation)
|
||||
populate(objectMap, "id", v.ID)
|
||||
populate(objectMap, "identity", v.Identity)
|
||||
populate(objectMap, "location", v.Location)
|
||||
populate(objectMap, "managedBy", v.ManagedBy)
|
||||
populate(objectMap, "name", v.Name)
|
||||
populate(objectMap, "plan", v.Plan)
|
||||
populate(objectMap, "properties", v.Properties)
|
||||
|
|
@ -14143,6 +14736,9 @@ func (v *VirtualMachine) UnmarshalJSON(data []byte) error {
|
|||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "etag":
|
||||
err = unpopulate(val, "Etag", &v.Etag)
|
||||
delete(rawMsg, key)
|
||||
case "extendedLocation":
|
||||
err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -14155,6 +14751,9 @@ func (v *VirtualMachine) UnmarshalJSON(data []byte) error {
|
|||
case "location":
|
||||
err = unpopulate(val, "Location", &v.Location)
|
||||
delete(rawMsg, key)
|
||||
case "managedBy":
|
||||
err = unpopulate(val, "ManagedBy", &v.ManagedBy)
|
||||
delete(rawMsg, key)
|
||||
case "name":
|
||||
err = unpopulate(val, "Name", &v.Name)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -15159,6 +15758,7 @@ func (v VirtualMachineInstanceView) MarshalJSON() ([]byte, error) {
|
|||
populate(objectMap, "disks", v.Disks)
|
||||
populate(objectMap, "extensions", v.Extensions)
|
||||
populate(objectMap, "hyperVGeneration", v.HyperVGeneration)
|
||||
populate(objectMap, "isVMInStandbyPool", v.IsVMInStandbyPool)
|
||||
populate(objectMap, "maintenanceRedeployStatus", v.MaintenanceRedeployStatus)
|
||||
populate(objectMap, "osName", v.OSName)
|
||||
populate(objectMap, "osVersion", v.OSVersion)
|
||||
|
|
@ -15199,6 +15799,9 @@ func (v *VirtualMachineInstanceView) UnmarshalJSON(data []byte) error {
|
|||
case "hyperVGeneration":
|
||||
err = unpopulate(val, "HyperVGeneration", &v.HyperVGeneration)
|
||||
delete(rawMsg, key)
|
||||
case "isVMInStandbyPool":
|
||||
err = unpopulate(val, "IsVMInStandbyPool", &v.IsVMInStandbyPool)
|
||||
delete(rawMsg, key)
|
||||
case "maintenanceRedeployStatus":
|
||||
err = unpopulate(val, "MaintenanceRedeployStatus", &v.MaintenanceRedeployStatus)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -16078,6 +16681,7 @@ func (v *VirtualMachineRunCommandsListResult) UnmarshalJSON(data []byte) error {
|
|||
// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSet.
|
||||
func (v VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "etag", v.Etag)
|
||||
populate(objectMap, "extendedLocation", v.ExtendedLocation)
|
||||
populate(objectMap, "id", v.ID)
|
||||
populate(objectMap, "identity", v.Identity)
|
||||
|
|
@ -16101,6 +16705,9 @@ func (v *VirtualMachineScaleSet) UnmarshalJSON(data []byte) error {
|
|||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "etag":
|
||||
err = unpopulate(val, "Etag", &v.Etag)
|
||||
delete(rawMsg, key)
|
||||
case "extendedLocation":
|
||||
err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -17124,6 +17731,7 @@ func (v VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
|
|||
populate(objectMap, "priorityMixPolicy", v.PriorityMixPolicy)
|
||||
populate(objectMap, "provisioningState", v.ProvisioningState)
|
||||
populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup)
|
||||
populate(objectMap, "resiliencyPolicy", v.ResiliencyPolicy)
|
||||
populate(objectMap, "scaleInPolicy", v.ScaleInPolicy)
|
||||
populate(objectMap, "singlePlacementGroup", v.SinglePlacementGroup)
|
||||
populate(objectMap, "spotRestorePolicy", v.SpotRestorePolicy)
|
||||
|
|
@ -17177,6 +17785,9 @@ func (v *VirtualMachineScaleSetProperties) UnmarshalJSON(data []byte) error {
|
|||
case "proximityPlacementGroup":
|
||||
err = unpopulate(val, "ProximityPlacementGroup", &v.ProximityPlacementGroup)
|
||||
delete(rawMsg, key)
|
||||
case "resiliencyPolicy":
|
||||
err = unpopulate(val, "ResiliencyPolicy", &v.ResiliencyPolicy)
|
||||
delete(rawMsg, key)
|
||||
case "scaleInPolicy":
|
||||
err = unpopulate(val, "ScaleInPolicy", &v.ScaleInPolicy)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -17835,6 +18446,7 @@ func (v VirtualMachineScaleSetUpdateProperties) MarshalJSON() ([]byte, error) {
|
|||
populate(objectMap, "overprovision", v.Overprovision)
|
||||
populate(objectMap, "priorityMixPolicy", v.PriorityMixPolicy)
|
||||
populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup)
|
||||
populate(objectMap, "resiliencyPolicy", v.ResiliencyPolicy)
|
||||
populate(objectMap, "scaleInPolicy", v.ScaleInPolicy)
|
||||
populate(objectMap, "singlePlacementGroup", v.SinglePlacementGroup)
|
||||
populate(objectMap, "spotRestorePolicy", v.SpotRestorePolicy)
|
||||
|
|
@ -17870,6 +18482,9 @@ func (v *VirtualMachineScaleSetUpdateProperties) UnmarshalJSON(data []byte) erro
|
|||
case "proximityPlacementGroup":
|
||||
err = unpopulate(val, "ProximityPlacementGroup", &v.ProximityPlacementGroup)
|
||||
delete(rawMsg, key)
|
||||
case "resiliencyPolicy":
|
||||
err = unpopulate(val, "ResiliencyPolicy", &v.ResiliencyPolicy)
|
||||
delete(rawMsg, key)
|
||||
case "scaleInPolicy":
|
||||
err = unpopulate(val, "ScaleInPolicy", &v.ScaleInPolicy)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -18072,6 +18687,7 @@ func (v *VirtualMachineScaleSetUpdateVMProfile) UnmarshalJSON(data []byte) error
|
|||
// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVM.
|
||||
func (v VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]any)
|
||||
populate(objectMap, "etag", v.Etag)
|
||||
populate(objectMap, "id", v.ID)
|
||||
populate(objectMap, "identity", v.Identity)
|
||||
populate(objectMap, "instanceId", v.InstanceID)
|
||||
|
|
@ -18096,6 +18712,9 @@ func (v *VirtualMachineScaleSetVM) UnmarshalJSON(data []byte) error {
|
|||
for key, val := range rawMsg {
|
||||
var err error
|
||||
switch key {
|
||||
case "etag":
|
||||
err = unpopulate(val, "Etag", &v.Etag)
|
||||
delete(rawMsg, key)
|
||||
case "id":
|
||||
err = unpopulate(val, "ID", &v.ID)
|
||||
delete(rawMsg, key)
|
||||
|
|
@ -18498,6 +19117,7 @@ func (v VirtualMachineScaleSetVMProfile) MarshalJSON() ([]byte, error) {
|
|||
populate(objectMap, "securityProfile", v.SecurityProfile)
|
||||
populate(objectMap, "serviceArtifactReference", v.ServiceArtifactReference)
|
||||
populate(objectMap, "storageProfile", v.StorageProfile)
|
||||
populateDateTimeRFC3339(objectMap, "timeCreated", v.TimeCreated)
|
||||
populate(objectMap, "userData", v.UserData)
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
|
@ -18559,6 +19179,9 @@ func (v *VirtualMachineScaleSetVMProfile) UnmarshalJSON(data []byte) error {
|
|||
case "storageProfile":
|
||||
err = unpopulate(val, "StorageProfile", &v.StorageProfile)
|
||||
delete(rawMsg, key)
|
||||
case "timeCreated":
|
||||
err = unpopulateDateTimeRFC3339(val, "TimeCreated", &v.TimeCreated)
|
||||
delete(rawMsg, key)
|
||||
case "userData":
|
||||
err = unpopulate(val, "UserData", &v.UserData)
|
||||
delete(rawMsg, key)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO
|
|||
|
||||
// NewListPager - Gets a list of compute operations.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
|
||||
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] {
|
||||
return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{
|
||||
|
|
@ -73,7 +73,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options *
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -400,6 +400,12 @@ type DedicatedHostsClientBeginDeleteOptions struct {
|
|||
ResumeToken string
|
||||
}
|
||||
|
||||
// DedicatedHostsClientBeginRedeployOptions contains the optional parameters for the DedicatedHostsClient.BeginRedeploy method.
|
||||
type DedicatedHostsClientBeginRedeployOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
// DedicatedHostsClientBeginRestartOptions contains the optional parameters for the DedicatedHostsClient.BeginRestart method.
|
||||
type DedicatedHostsClientBeginRestartOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
|
|
@ -956,7 +962,8 @@ type SSHPublicKeysClientDeleteOptions struct {
|
|||
// SSHPublicKeysClientGenerateKeyPairOptions contains the optional parameters for the SSHPublicKeysClient.GenerateKeyPair
|
||||
// method.
|
||||
type SSHPublicKeysClientGenerateKeyPairOptions struct {
|
||||
// placeholder for future optional parameters
|
||||
// Parameters supplied to generate the SSH public key.
|
||||
Parameters *SSHGenerateKeyPairInputParameters
|
||||
}
|
||||
|
||||
// SSHPublicKeysClientGetOptions contains the optional parameters for the SSHPublicKeysClient.Get method.
|
||||
|
|
@ -1375,6 +1382,20 @@ type VirtualMachineScaleSetVMRunCommandsClientListOptions struct {
|
|||
Expand *string
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade
|
||||
// method.
|
||||
type VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks
|
||||
// method.
|
||||
type VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetVMsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDeallocate
|
||||
// method.
|
||||
type VirtualMachineScaleSetVMsClientBeginDeallocateOptions struct {
|
||||
|
|
@ -1458,6 +1479,14 @@ type VirtualMachineScaleSetVMsClientBeginStartOptions struct {
|
|||
// VirtualMachineScaleSetVMsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginUpdate
|
||||
// method.
|
||||
type VirtualMachineScaleSetVMsClientBeginUpdateOptions struct {
|
||||
// The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
|
||||
// to prevent accidentally overwriting concurrent changes.
|
||||
IfMatch *string
|
||||
|
||||
// Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
|
||||
// in error from server as they are not supported.
|
||||
IfNoneMatch *string
|
||||
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
|
@ -1505,9 +1534,27 @@ type VirtualMachineScaleSetVMsClientSimulateEvictionOptions struct {
|
|||
// placeholder for future optional parameters
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade
|
||||
// method.
|
||||
type VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
|
||||
// A list of virtual machine instance IDs from the VM scale set.
|
||||
VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginCreateOrUpdate
|
||||
// method.
|
||||
type VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions struct {
|
||||
// The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
|
||||
// to prevent accidentally overwriting concurrent changes.
|
||||
IfMatch *string
|
||||
|
||||
// Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
|
||||
// in error from server as they are not supported.
|
||||
IfNoneMatch *string
|
||||
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
|
@ -1644,6 +1691,14 @@ type VirtualMachineScaleSetsClientBeginUpdateInstancesOptions struct {
|
|||
// VirtualMachineScaleSetsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdate
|
||||
// method.
|
||||
type VirtualMachineScaleSetsClientBeginUpdateOptions struct {
|
||||
// The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
|
||||
// to prevent accidentally overwriting concurrent changes.
|
||||
IfMatch *string
|
||||
|
||||
// Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
|
||||
// in error from server as they are not supported.
|
||||
IfNoneMatch *string
|
||||
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
|
@ -1719,6 +1774,13 @@ type VirtualMachinesClientBeginAssessPatchesOptions struct {
|
|||
ResumeToken string
|
||||
}
|
||||
|
||||
// VirtualMachinesClientBeginAttachDetachDataDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginAttachDetachDataDisks
|
||||
// method.
|
||||
type VirtualMachinesClientBeginAttachDetachDataDisksOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
||||
// VirtualMachinesClientBeginCaptureOptions contains the optional parameters for the VirtualMachinesClient.BeginCapture method.
|
||||
type VirtualMachinesClientBeginCaptureOptions struct {
|
||||
// Resumes the LRO from the provided token.
|
||||
|
|
@ -1735,6 +1797,14 @@ type VirtualMachinesClientBeginConvertToManagedDisksOptions struct {
|
|||
// VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate
|
||||
// method.
|
||||
type VirtualMachinesClientBeginCreateOrUpdateOptions struct {
|
||||
// The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
|
||||
// to prevent accidentally overwriting concurrent changes.
|
||||
IfMatch *string
|
||||
|
||||
// Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
|
||||
// in error from server as they are not supported.
|
||||
IfNoneMatch *string
|
||||
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
|
@ -1826,6 +1896,14 @@ type VirtualMachinesClientBeginStartOptions struct {
|
|||
|
||||
// VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
|
||||
type VirtualMachinesClientBeginUpdateOptions struct {
|
||||
// The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
|
||||
// to prevent accidentally overwriting concurrent changes.
|
||||
IfMatch *string
|
||||
|
||||
// Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
|
||||
// in error from server as they are not supported.
|
||||
IfNoneMatch *string
|
||||
|
||||
// Resumes the LRO from the provided token.
|
||||
ResumeToken string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewProximityPlacementGroupsClient(subscriptionID string, credential azcore.
|
|||
// CreateOrUpdate - Create or update a proximity placement group.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - proximityPlacementGroupName - The name of the proximity placement group.
|
||||
// - parameters - Parameters supplied to the Create Proximity Placement Group operation.
|
||||
|
|
@ -95,7 +95,7 @@ func (client *ProximityPlacementGroupsClient) createOrUpdateCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -116,7 +116,7 @@ func (client *ProximityPlacementGroupsClient) createOrUpdateHandleResponse(resp
|
|||
// Delete - Delete a proximity placement group.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - proximityPlacementGroupName - The name of the proximity placement group.
|
||||
// - options - ProximityPlacementGroupsClientDeleteOptions contains the optional parameters for the ProximityPlacementGroupsClient.Delete
|
||||
|
|
@ -162,7 +162,7 @@ func (client *ProximityPlacementGroupsClient) deleteCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -171,7 +171,7 @@ func (client *ProximityPlacementGroupsClient) deleteCreateRequest(ctx context.Co
|
|||
// Get - Retrieves information about a proximity placement group .
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - proximityPlacementGroupName - The name of the proximity placement group.
|
||||
// - options - ProximityPlacementGroupsClientGetOptions contains the optional parameters for the ProximityPlacementGroupsClient.Get
|
||||
|
|
@ -221,7 +221,7 @@ func (client *ProximityPlacementGroupsClient) getCreateRequest(ctx context.Conte
|
|||
if options != nil && options.IncludeColocationStatus != nil {
|
||||
reqQP.Set("includeColocationStatus", *options.IncludeColocationStatus)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -238,7 +238,7 @@ func (client *ProximityPlacementGroupsClient) getHandleResponse(resp *http.Respo
|
|||
|
||||
// NewListByResourceGroupPager - Lists all proximity placement groups in a resource group.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - ProximityPlacementGroupsClientListByResourceGroupOptions contains the optional parameters for the ProximityPlacementGroupsClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -281,7 +281,7 @@ func (client *ProximityPlacementGroupsClient) listByResourceGroupCreateRequest(c
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -298,7 +298,7 @@ func (client *ProximityPlacementGroupsClient) listByResourceGroupHandleResponse(
|
|||
|
||||
// NewListBySubscriptionPager - Lists all proximity placement groups in a subscription.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - ProximityPlacementGroupsClientListBySubscriptionOptions contains the optional parameters for the ProximityPlacementGroupsClient.NewListBySubscriptionPager
|
||||
// method.
|
||||
func (client *ProximityPlacementGroupsClient) NewListBySubscriptionPager(options *ProximityPlacementGroupsClientListBySubscriptionOptions) *runtime.Pager[ProximityPlacementGroupsClientListBySubscriptionResponse] {
|
||||
|
|
@ -336,7 +336,7 @@ func (client *ProximityPlacementGroupsClient) listBySubscriptionCreateRequest(ct
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -354,7 +354,7 @@ func (client *ProximityPlacementGroupsClient) listBySubscriptionHandleResponse(r
|
|||
// Update - Update a proximity placement group.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - proximityPlacementGroupName - The name of the proximity placement group.
|
||||
// - parameters - Parameters supplied to the Update Proximity Placement Group operation.
|
||||
|
|
@ -402,7 +402,7 @@ func (client *ProximityPlacementGroupsClient) updateCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -404,6 +404,11 @@ type DedicatedHostsClientListByHostGroupResponse struct {
|
|||
DedicatedHostListResult
|
||||
}
|
||||
|
||||
// DedicatedHostsClientRedeployResponse contains the response from method DedicatedHostsClient.BeginRedeploy.
|
||||
type DedicatedHostsClientRedeployResponse struct {
|
||||
// placeholder for future response values
|
||||
}
|
||||
|
||||
// DedicatedHostsClientRestartResponse contains the response from method DedicatedHostsClient.BeginRestart.
|
||||
type DedicatedHostsClientRestartResponse struct {
|
||||
// placeholder for future response values
|
||||
|
|
@ -1286,6 +1291,17 @@ type VirtualMachineScaleSetVMRunCommandsClientUpdateResponse struct {
|
|||
VirtualMachineRunCommand
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade.
|
||||
type VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse struct {
|
||||
// placeholder for future response values
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks.
|
||||
type VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse struct {
|
||||
// Specifies the storage settings for the virtual machine disks.
|
||||
StorageProfile
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetVMsClientDeallocateResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginDeallocate.
|
||||
type VirtualMachineScaleSetVMsClientDeallocateResponse struct {
|
||||
// placeholder for future response values
|
||||
|
|
@ -1371,6 +1387,11 @@ type VirtualMachineScaleSetVMsClientUpdateResponse struct {
|
|||
VirtualMachineScaleSetVM
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetsClientApproveRollingUpgradeResponse contains the response from method VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade.
|
||||
type VirtualMachineScaleSetsClientApproveRollingUpgradeResponse struct {
|
||||
// placeholder for future response values
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse contains the response from method VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup.
|
||||
type VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse struct {
|
||||
// placeholder for future response values
|
||||
|
|
@ -1514,6 +1535,12 @@ type VirtualMachinesClientAssessPatchesResponse struct {
|
|||
VirtualMachineAssessPatchesResult
|
||||
}
|
||||
|
||||
// VirtualMachinesClientAttachDetachDataDisksResponse contains the response from method VirtualMachinesClient.BeginAttachDetachDataDisks.
|
||||
type VirtualMachinesClientAttachDetachDataDisksResponse struct {
|
||||
// Specifies the storage settings for the virtual machine disks.
|
||||
StorageProfile
|
||||
}
|
||||
|
||||
// VirtualMachinesClientCaptureResponse contains the response from method VirtualMachinesClient.BeginCapture.
|
||||
type VirtualMachinesClientCaptureResponse struct {
|
||||
// Output of virtual machine capture operation.
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func NewRestorePointCollectionsClient(subscriptionID string, credential azcore.T
|
|||
// for more details. When updating a restore point collection, only tags may be modified.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection.
|
||||
// - parameters - Parameters supplied to the Create or Update restore point collection operation.
|
||||
|
|
@ -96,7 +96,7 @@ func (client *RestorePointCollectionsClient) createOrUpdateCreateRequest(ctx con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -118,7 +118,7 @@ func (client *RestorePointCollectionsClient) createOrUpdateHandleResponse(resp *
|
|||
// points.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the Restore Point Collection.
|
||||
// - options - RestorePointCollectionsClientBeginDeleteOptions contains the optional parameters for the RestorePointCollectionsClient.BeginDelete
|
||||
|
|
@ -144,7 +144,7 @@ func (client *RestorePointCollectionsClient) BeginDelete(ctx context.Context, re
|
|||
// points.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *RestorePointCollectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, restorePointCollectionName string, options *RestorePointCollectionsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "RestorePointCollectionsClient.BeginDelete"
|
||||
|
|
@ -186,7 +186,7 @@ func (client *RestorePointCollectionsClient) deleteCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -195,7 +195,7 @@ func (client *RestorePointCollectionsClient) deleteCreateRequest(ctx context.Con
|
|||
// Get - The operation to get the restore point collection.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection.
|
||||
// - options - RestorePointCollectionsClientGetOptions contains the optional parameters for the RestorePointCollectionsClient.Get
|
||||
|
|
@ -245,7 +245,7 @@ func (client *RestorePointCollectionsClient) getCreateRequest(ctx context.Contex
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -262,7 +262,7 @@ func (client *RestorePointCollectionsClient) getHandleResponse(resp *http.Respon
|
|||
|
||||
// NewListPager - Gets the list of restore point collections in a resource group.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - RestorePointCollectionsClientListOptions contains the optional parameters for the RestorePointCollectionsClient.NewListPager
|
||||
// method.
|
||||
|
|
@ -305,7 +305,7 @@ func (client *RestorePointCollectionsClient) listCreateRequest(ctx context.Conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -324,7 +324,7 @@ func (client *RestorePointCollectionsClient) listHandleResponse(resp *http.Respo
|
|||
// to get the next page of restore point collections. Do this till nextLink is not null to fetch all
|
||||
// the restore point collections.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - RestorePointCollectionsClientListAllOptions contains the optional parameters for the RestorePointCollectionsClient.NewListAllPager
|
||||
// method.
|
||||
func (client *RestorePointCollectionsClient) NewListAllPager(options *RestorePointCollectionsClientListAllOptions) *runtime.Pager[RestorePointCollectionsClientListAllResponse] {
|
||||
|
|
@ -362,7 +362,7 @@ func (client *RestorePointCollectionsClient) listAllCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -380,7 +380,7 @@ func (client *RestorePointCollectionsClient) listAllHandleResponse(resp *http.Re
|
|||
// Update - The operation to update the restore point collection.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection.
|
||||
// - parameters - Parameters supplied to the Update restore point collection operation.
|
||||
|
|
@ -428,7 +428,7 @@ func (client *RestorePointCollectionsClient) updateCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewRestorePointsClient(subscriptionID string, credential azcore.TokenCreden
|
|||
// BeginCreate - The operation to create the restore point. Updating properties of an existing restore point is not allowed
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection.
|
||||
// - restorePointName - The name of the restore point.
|
||||
|
|
@ -74,7 +74,7 @@ func (client *RestorePointsClient) BeginCreate(ctx context.Context, resourceGrou
|
|||
// Create - The operation to create the restore point. Updating properties of an existing restore point is not allowed
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *RestorePointsClient) create(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint, options *RestorePointsClientBeginCreateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "RestorePointsClient.BeginCreate"
|
||||
|
|
@ -120,7 +120,7 @@ func (client *RestorePointsClient) createCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -132,7 +132,7 @@ func (client *RestorePointsClient) createCreateRequest(ctx context.Context, reso
|
|||
// BeginDelete - The operation to delete the restore point.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the Restore Point Collection.
|
||||
// - restorePointName - The name of the restore point.
|
||||
|
|
@ -158,7 +158,7 @@ func (client *RestorePointsClient) BeginDelete(ctx context.Context, resourceGrou
|
|||
// Delete - The operation to delete the restore point.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *RestorePointsClient) deleteOperation(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "RestorePointsClient.BeginDelete"
|
||||
|
|
@ -204,7 +204,7 @@ func (client *RestorePointsClient) deleteCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -213,7 +213,7 @@ func (client *RestorePointsClient) deleteCreateRequest(ctx context.Context, reso
|
|||
// Get - The operation to get the restore point.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - restorePointCollectionName - The name of the restore point collection.
|
||||
// - restorePointName - The name of the restore point.
|
||||
|
|
@ -267,7 +267,7 @@ func (client *RestorePointsClient) getCreateRequest(ctx context.Context, resourc
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewSharedGalleriesClient(subscriptionID string, credential azcore.TokenCred
|
|||
// Get - Get a shared gallery by subscription id or tenant id.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - galleryUniqueName - The unique name of the Shared Gallery.
|
||||
// - options - SharedGalleriesClientGetOptions contains the optional parameters for the SharedGalleriesClient.Get method.
|
||||
|
|
@ -93,7 +93,7 @@ func (client *SharedGalleriesClient) getCreateRequest(ctx context.Context, locat
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -110,7 +110,7 @@ func (client *SharedGalleriesClient) getHandleResponse(resp *http.Response) (Sha
|
|||
|
||||
// NewListPager - List shared galleries by subscription id or tenant id.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - options - SharedGalleriesClientListOptions contains the optional parameters for the SharedGalleriesClient.NewListPager
|
||||
// method.
|
||||
|
|
@ -153,7 +153,7 @@ func (client *SharedGalleriesClient) listCreateRequest(ctx context.Context, loca
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
if options != nil && options.SharedTo != nil {
|
||||
reqQP.Set("sharedTo", string(*options.SharedTo))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewSharedGalleryImagesClient(subscriptionID string, credential azcore.Token
|
|||
// Get - Get a shared gallery image by subscription id or tenant id.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - galleryUniqueName - The unique name of the Shared Gallery.
|
||||
// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
|
||||
|
|
@ -98,7 +98,7 @@ func (client *SharedGalleryImagesClient) getCreateRequest(ctx context.Context, l
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -115,7 +115,7 @@ func (client *SharedGalleryImagesClient) getHandleResponse(resp *http.Response)
|
|||
|
||||
// NewListPager - List shared gallery images by subscription id or tenant id.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - galleryUniqueName - The unique name of the Shared Gallery.
|
||||
// - options - SharedGalleryImagesClientListOptions contains the optional parameters for the SharedGalleryImagesClient.NewListPager
|
||||
|
|
@ -163,7 +163,7 @@ func (client *SharedGalleryImagesClient) listCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
if options != nil && options.SharedTo != nil {
|
||||
reqQP.Set("sharedTo", string(*options.SharedTo))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewSharedGalleryImageVersionsClient(subscriptionID string, credential azcor
|
|||
// Get - Get a shared gallery image version by subscription id or tenant id.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - galleryUniqueName - The unique name of the Shared Gallery.
|
||||
// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
|
||||
|
|
@ -106,7 +106,7 @@ func (client *SharedGalleryImageVersionsClient) getCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -123,7 +123,7 @@ func (client *SharedGalleryImageVersionsClient) getHandleResponse(resp *http.Res
|
|||
|
||||
// NewListPager - List shared gallery image versions by subscription id or tenant id.
|
||||
//
|
||||
// Generated from API version 2022-03-03
|
||||
// Generated from API version 2022-08-03
|
||||
// - location - Resource location.
|
||||
// - galleryUniqueName - The unique name of the Shared Gallery.
|
||||
// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
|
||||
|
|
@ -176,7 +176,7 @@ func (client *SharedGalleryImageVersionsClient) listCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2022-03-03")
|
||||
reqQP.Set("api-version", "2022-08-03")
|
||||
if options != nil && options.SharedTo != nil {
|
||||
reqQP.Set("sharedTo", string(*options.SharedTo))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewSnapshotsClient(subscriptionID string, credential azcore.TokenCredential
|
|||
// BeginCreateOrUpdate - Creates or updates a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
|
||||
// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
|
||||
|
|
@ -75,7 +75,7 @@ func (client *SnapshotsClient) BeginCreateOrUpdate(ctx context.Context, resource
|
|||
// CreateOrUpdate - Creates or updates a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *SnapshotsClient) createOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot, options *SnapshotsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "SnapshotsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -117,7 +117,7 @@ func (client *SnapshotsClient) createOrUpdateCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, snapshot); err != nil {
|
||||
|
|
@ -129,7 +129,7 @@ func (client *SnapshotsClient) createOrUpdateCreateRequest(ctx context.Context,
|
|||
// BeginDelete - Deletes a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
|
||||
// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
|
||||
|
|
@ -155,7 +155,7 @@ func (client *SnapshotsClient) BeginDelete(ctx context.Context, resourceGroupNam
|
|||
// Delete - Deletes a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *SnapshotsClient) deleteOperation(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "SnapshotsClient.BeginDelete"
|
||||
|
|
@ -197,7 +197,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
return req, nil
|
||||
}
|
||||
|
|
@ -205,7 +205,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource
|
|||
// Get - Gets information about a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
|
||||
// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
|
||||
|
|
@ -253,7 +253,7 @@ func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGro
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -271,7 +271,7 @@ func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (Snapshots
|
|||
// BeginGrantAccess - Grants access to a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
|
||||
// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
|
||||
|
|
@ -300,7 +300,7 @@ func (client *SnapshotsClient) BeginGrantAccess(ctx context.Context, resourceGro
|
|||
// GrantAccess - Grants access to a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *SnapshotsClient) grantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData, options *SnapshotsClientBeginGrantAccessOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "SnapshotsClient.BeginGrantAccess"
|
||||
|
|
@ -342,7 +342,7 @@ func (client *SnapshotsClient) grantAccessCreateRequest(ctx context.Context, res
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, grantAccessData); err != nil {
|
||||
|
|
@ -353,7 +353,7 @@ func (client *SnapshotsClient) grantAccessCreateRequest(ctx context.Context, res
|
|||
|
||||
// NewListPager - Lists snapshots under a subscription.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - options - SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.NewListPager method.
|
||||
func (client *SnapshotsClient) NewListPager(options *SnapshotsClientListOptions) *runtime.Pager[SnapshotsClientListResponse] {
|
||||
return runtime.NewPager(runtime.PagingHandler[SnapshotsClientListResponse]{
|
||||
|
|
@ -390,7 +390,7 @@ func (client *SnapshotsClient) listCreateRequest(ctx context.Context, options *S
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -407,7 +407,7 @@ func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (Snapshot
|
|||
|
||||
// NewListByResourceGroupPager - Lists snapshots under a resource group.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -450,7 +450,7 @@ func (client *SnapshotsClient) listByResourceGroupCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -468,7 +468,7 @@ func (client *SnapshotsClient) listByResourceGroupHandleResponse(resp *http.Resp
|
|||
// BeginRevokeAccess - Revokes access to a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
|
||||
// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
|
||||
|
|
@ -496,7 +496,7 @@ func (client *SnapshotsClient) BeginRevokeAccess(ctx context.Context, resourceGr
|
|||
// RevokeAccess - Revokes access to a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *SnapshotsClient) revokeAccess(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginRevokeAccessOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "SnapshotsClient.BeginRevokeAccess"
|
||||
|
|
@ -538,7 +538,7 @@ func (client *SnapshotsClient) revokeAccessCreateRequest(ctx context.Context, re
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
return req, nil
|
||||
}
|
||||
|
|
@ -546,7 +546,7 @@ func (client *SnapshotsClient) revokeAccessCreateRequest(ctx context.Context, re
|
|||
// BeginUpdate - Updates (patches) a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
|
||||
// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
|
||||
|
|
@ -573,7 +573,7 @@ func (client *SnapshotsClient) BeginUpdate(ctx context.Context, resourceGroupNam
|
|||
// Update - Updates (patches) a snapshot.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-04-02
|
||||
// Generated from API version 2023-10-02
|
||||
func (client *SnapshotsClient) update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate, options *SnapshotsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "SnapshotsClient.BeginUpdate"
|
||||
|
|
@ -615,7 +615,7 @@ func (client *SnapshotsClient) updateCreateRequest(ctx context.Context, resource
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-04-02")
|
||||
reqQP.Set("api-version", "2023-10-02")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, snapshot); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewSSHPublicKeysClient(subscriptionID string, credential azcore.TokenCreden
|
|||
// Create - Creates a new SSH public key resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - sshPublicKeyName - The name of the SSH public key.
|
||||
// - parameters - Parameters supplied to create the SSH public key.
|
||||
|
|
@ -94,7 +94,7 @@ func (client *SSHPublicKeysClient) createCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -115,7 +115,7 @@ func (client *SSHPublicKeysClient) createHandleResponse(resp *http.Response) (SS
|
|||
// Delete - Delete an SSH public key.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - sshPublicKeyName - The name of the SSH public key.
|
||||
// - options - SSHPublicKeysClientDeleteOptions contains the optional parameters for the SSHPublicKeysClient.Delete method.
|
||||
|
|
@ -160,7 +160,7 @@ func (client *SSHPublicKeysClient) deleteCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -171,7 +171,7 @@ func (client *SSHPublicKeysClient) deleteCreateRequest(ctx context.Context, reso
|
|||
// SSH public key resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - sshPublicKeyName - The name of the SSH public key.
|
||||
// - options - SSHPublicKeysClientGenerateKeyPairOptions contains the optional parameters for the SSHPublicKeysClient.GenerateKeyPair
|
||||
|
|
@ -218,9 +218,15 @@ func (client *SSHPublicKeysClient) generateKeyPairCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.Parameters != nil {
|
||||
if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return req, nil
|
||||
}
|
||||
return req, nil
|
||||
}
|
||||
|
||||
|
|
@ -236,7 +242,7 @@ func (client *SSHPublicKeysClient) generateKeyPairHandleResponse(resp *http.Resp
|
|||
// Get - Retrieves information about an SSH public key.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - sshPublicKeyName - The name of the SSH public key.
|
||||
// - options - SSHPublicKeysClientGetOptions contains the optional parameters for the SSHPublicKeysClient.Get method.
|
||||
|
|
@ -282,7 +288,7 @@ func (client *SSHPublicKeysClient) getCreateRequest(ctx context.Context, resourc
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -300,7 +306,7 @@ func (client *SSHPublicKeysClient) getHandleResponse(resp *http.Response) (SSHPu
|
|||
// NewListByResourceGroupPager - Lists all of the SSH public keys in the specified resource group. Use the nextLink property
|
||||
// in the response to get the next page of SSH public keys.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - SSHPublicKeysClientListByResourceGroupOptions contains the optional parameters for the SSHPublicKeysClient.NewListByResourceGroupPager
|
||||
// method.
|
||||
|
|
@ -343,7 +349,7 @@ func (client *SSHPublicKeysClient) listByResourceGroupCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -361,7 +367,7 @@ func (client *SSHPublicKeysClient) listByResourceGroupHandleResponse(resp *http.
|
|||
// NewListBySubscriptionPager - Lists all of the SSH public keys in the subscription. Use the nextLink property in the response
|
||||
// to get the next page of SSH public keys.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - SSHPublicKeysClientListBySubscriptionOptions contains the optional parameters for the SSHPublicKeysClient.NewListBySubscriptionPager
|
||||
// method.
|
||||
func (client *SSHPublicKeysClient) NewListBySubscriptionPager(options *SSHPublicKeysClientListBySubscriptionOptions) *runtime.Pager[SSHPublicKeysClientListBySubscriptionResponse] {
|
||||
|
|
@ -399,7 +405,7 @@ func (client *SSHPublicKeysClient) listBySubscriptionCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -417,7 +423,7 @@ func (client *SSHPublicKeysClient) listBySubscriptionHandleResponse(resp *http.R
|
|||
// Update - Updates a new SSH public key resource.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - sshPublicKeyName - The name of the SSH public key.
|
||||
// - parameters - Parameters supplied to update the SSH public key.
|
||||
|
|
@ -464,7 +470,7 @@ func (client *SSHPublicKeysClient) updateCreateRequest(ctx context.Context, reso
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewUsageClient(subscriptionID string, credential azcore.TokenCredential, op
|
|||
// NewListPager - Gets, for the specified location, the current compute resource usage information as well as the limits for
|
||||
// compute resources under the subscription.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The location for which resource usage is queried.
|
||||
// - options - UsageClientListOptions contains the optional parameters for the UsageClient.NewListPager method.
|
||||
func (client *UsageClient) NewListPager(location string, options *UsageClientListOptions) *runtime.Pager[UsageClientListResponse] {
|
||||
|
|
@ -89,7 +89,7 @@ func (client *UsageClient) listCreateRequest(ctx context.Context, location strin
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string, credential az
|
|||
// Get - Gets a virtual machine extension image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - options - VirtualMachineExtensionImagesClientGetOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.Get
|
||||
// method.
|
||||
|
|
@ -102,7 +102,7 @@ func (client *VirtualMachineExtensionImagesClient) getCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -120,7 +120,7 @@ func (client *VirtualMachineExtensionImagesClient) getHandleResponse(resp *http.
|
|||
// ListTypes - Gets a list of virtual machine extension image types.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - options - VirtualMachineExtensionImagesClientListTypesOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListTypes
|
||||
// method.
|
||||
|
|
@ -166,7 +166,7 @@ func (client *VirtualMachineExtensionImagesClient) listTypesCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -184,7 +184,7 @@ func (client *VirtualMachineExtensionImagesClient) listTypesHandleResponse(resp
|
|||
// ListVersions - Gets a list of virtual machine extension image versions.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - options - VirtualMachineExtensionImagesClientListVersionsOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListVersions
|
||||
// method.
|
||||
|
|
@ -243,7 +243,7 @@ func (client *VirtualMachineExtensionImagesClient) listVersionsCreateRequest(ctx
|
|||
if options != nil && options.Orderby != nil {
|
||||
reqQP.Set("$orderby", *options.Orderby)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewVirtualMachineExtensionsClient(subscriptionID string, credential azcore.
|
|||
// BeginCreateOrUpdate - The operation to create or update the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine where the extension should be created or updated.
|
||||
// - vmExtensionName - The name of the virtual machine extension.
|
||||
|
|
@ -74,7 +74,7 @@ func (client *VirtualMachineExtensionsClient) BeginCreateOrUpdate(ctx context.Co
|
|||
// CreateOrUpdate - The operation to create or update the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtension, options *VirtualMachineExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineExtensionsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -120,7 +120,7 @@ func (client *VirtualMachineExtensionsClient) createOrUpdateCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
|
||||
|
|
@ -132,7 +132,7 @@ func (client *VirtualMachineExtensionsClient) createOrUpdateCreateRequest(ctx co
|
|||
// BeginDelete - The operation to delete the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine where the extension should be deleted.
|
||||
// - vmExtensionName - The name of the virtual machine extension.
|
||||
|
|
@ -158,7 +158,7 @@ func (client *VirtualMachineExtensionsClient) BeginDelete(ctx context.Context, r
|
|||
// Delete - The operation to delete the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, options *VirtualMachineExtensionsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineExtensionsClient.BeginDelete"
|
||||
|
|
@ -204,7 +204,7 @@ func (client *VirtualMachineExtensionsClient) deleteCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -213,7 +213,7 @@ func (client *VirtualMachineExtensionsClient) deleteCreateRequest(ctx context.Co
|
|||
// Get - The operation to get the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine containing the extension.
|
||||
// - vmExtensionName - The name of the virtual machine extension.
|
||||
|
|
@ -268,7 +268,7 @@ func (client *VirtualMachineExtensionsClient) getCreateRequest(ctx context.Conte
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -286,7 +286,7 @@ func (client *VirtualMachineExtensionsClient) getHandleResponse(resp *http.Respo
|
|||
// List - The operation to get all extensions of a Virtual Machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine containing the extension.
|
||||
// - options - VirtualMachineExtensionsClientListOptions contains the optional parameters for the VirtualMachineExtensionsClient.List
|
||||
|
|
@ -336,7 +336,7 @@ func (client *VirtualMachineExtensionsClient) listCreateRequest(ctx context.Cont
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -354,7 +354,7 @@ func (client *VirtualMachineExtensionsClient) listHandleResponse(resp *http.Resp
|
|||
// BeginUpdate - The operation to update the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine where the extension should be updated.
|
||||
// - vmExtensionName - The name of the virtual machine extension.
|
||||
|
|
@ -381,7 +381,7 @@ func (client *VirtualMachineExtensionsClient) BeginUpdate(ctx context.Context, r
|
|||
// Update - The operation to update the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineExtensionsClient) update(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtensionUpdate, options *VirtualMachineExtensionsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineExtensionsClient.BeginUpdate"
|
||||
|
|
@ -427,7 +427,7 @@ func (client *VirtualMachineExtensionsClient) updateCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func NewVirtualMachineImagesClient(subscriptionID string, credential azcore.Toke
|
|||
// Get - Gets a virtual machine image.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - publisherName - A valid image publisher.
|
||||
// - offer - A valid image publisher offer.
|
||||
|
|
@ -110,7 +110,7 @@ func (client *VirtualMachineImagesClient) getCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -128,7 +128,7 @@ func (client *VirtualMachineImagesClient) getHandleResponse(resp *http.Response)
|
|||
// List - Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - publisherName - A valid image publisher.
|
||||
// - offer - A valid image publisher offer.
|
||||
|
|
@ -194,7 +194,7 @@ func (client *VirtualMachineImagesClient) listCreateRequest(ctx context.Context,
|
|||
if options != nil && options.Orderby != nil {
|
||||
reqQP.Set("$orderby", *options.Orderby)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -212,7 +212,7 @@ func (client *VirtualMachineImagesClient) listHandleResponse(resp *http.Response
|
|||
// ListByEdgeZone - Gets a list of all virtual machine image versions for the specified edge zone
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - edgeZone - The name of the edge zone.
|
||||
// - options - VirtualMachineImagesClientListByEdgeZoneOptions contains the optional parameters for the VirtualMachineImagesClient.ListByEdgeZone
|
||||
|
|
@ -259,7 +259,7 @@ func (client *VirtualMachineImagesClient) listByEdgeZoneCreateRequest(ctx contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -277,7 +277,7 @@ func (client *VirtualMachineImagesClient) listByEdgeZoneHandleResponse(resp *htt
|
|||
// ListOffers - Gets a list of virtual machine image offers for the specified location and publisher.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - publisherName - A valid image publisher.
|
||||
// - options - VirtualMachineImagesClientListOffersOptions contains the optional parameters for the VirtualMachineImagesClient.ListOffers
|
||||
|
|
@ -324,7 +324,7 @@ func (client *VirtualMachineImagesClient) listOffersCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -342,7 +342,7 @@ func (client *VirtualMachineImagesClient) listOffersHandleResponse(resp *http.Re
|
|||
// ListPublishers - Gets a list of virtual machine image publishers for the specified Azure location.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - options - VirtualMachineImagesClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesClient.ListPublishers
|
||||
// method.
|
||||
|
|
@ -384,7 +384,7 @@ func (client *VirtualMachineImagesClient) listPublishersCreateRequest(ctx contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -402,7 +402,7 @@ func (client *VirtualMachineImagesClient) listPublishersHandleResponse(resp *htt
|
|||
// ListSKUs - Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - publisherName - A valid image publisher.
|
||||
// - offer - A valid image publisher offer.
|
||||
|
|
@ -454,7 +454,7 @@ func (client *VirtualMachineImagesClient) listSKUsCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func NewVirtualMachineImagesEdgeZoneClient(subscriptionID string, credential azc
|
|||
// Get - Gets a virtual machine image in an edge zone.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - edgeZone - The name of the edge zone.
|
||||
// - publisherName - A valid image publisher.
|
||||
|
|
@ -115,7 +115,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) getCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -133,7 +133,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) getHandleResponse(resp *http.R
|
|||
// List - Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - edgeZone - The name of the edge zone.
|
||||
// - publisherName - A valid image publisher.
|
||||
|
|
@ -204,7 +204,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listCreateRequest(ctx context.
|
|||
if options != nil && options.Orderby != nil {
|
||||
reqQP.Set("$orderby", *options.Orderby)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -222,7 +222,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listHandleResponse(resp *http.
|
|||
// ListOffers - Gets a list of virtual machine image offers for the specified location, edge zone and publisher.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - edgeZone - The name of the edge zone.
|
||||
// - publisherName - A valid image publisher.
|
||||
|
|
@ -274,7 +274,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listOffersCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -292,7 +292,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listOffersHandleResponse(resp
|
|||
// ListPublishers - Gets a list of virtual machine image publishers for the specified Azure location and edge zone.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - edgeZone - The name of the edge zone.
|
||||
// - options - VirtualMachineImagesEdgeZoneClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListPublishers
|
||||
|
|
@ -339,7 +339,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listPublishersCreateRequest(ct
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -357,7 +357,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listPublishersHandleResponse(r
|
|||
// ListSKUs - Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The name of a supported Azure region.
|
||||
// - edgeZone - The name of the edge zone.
|
||||
// - publisherName - A valid image publisher.
|
||||
|
|
@ -414,7 +414,7 @@ func (client *VirtualMachineImagesEdgeZoneClient) listSKUsCreateRequest(ctx cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string, credential azcore
|
|||
// BeginCreateOrUpdate - The operation to create or update the run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine where the run command should be created or updated.
|
||||
// - runCommandName - The name of the virtual machine run command.
|
||||
|
|
@ -74,7 +74,7 @@ func (client *VirtualMachineRunCommandsClient) BeginCreateOrUpdate(ctx context.C
|
|||
// CreateOrUpdate - The operation to create or update the run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineRunCommandsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineRunCommandsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -120,7 +120,7 @@ func (client *VirtualMachineRunCommandsClient) createOrUpdateCreateRequest(ctx c
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
|
||||
|
|
@ -132,7 +132,7 @@ func (client *VirtualMachineRunCommandsClient) createOrUpdateCreateRequest(ctx c
|
|||
// BeginDelete - The operation to delete the run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine where the run command should be deleted.
|
||||
// - runCommandName - The name of the virtual machine run command.
|
||||
|
|
@ -158,7 +158,7 @@ func (client *VirtualMachineRunCommandsClient) BeginDelete(ctx context.Context,
|
|||
// Delete - The operation to delete the run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineRunCommandsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, options *VirtualMachineRunCommandsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineRunCommandsClient.BeginDelete"
|
||||
|
|
@ -204,7 +204,7 @@ func (client *VirtualMachineRunCommandsClient) deleteCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
return req, nil
|
||||
|
|
@ -213,7 +213,7 @@ func (client *VirtualMachineRunCommandsClient) deleteCreateRequest(ctx context.C
|
|||
// Get - Gets specific run command for a subscription in a location.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The location upon which run commands is queried.
|
||||
// - commandID - The command id.
|
||||
// - options - VirtualMachineRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineRunCommandsClient.Get
|
||||
|
|
@ -260,7 +260,7 @@ func (client *VirtualMachineRunCommandsClient) getCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
return req, nil
|
||||
|
|
@ -278,7 +278,7 @@ func (client *VirtualMachineRunCommandsClient) getHandleResponse(resp *http.Resp
|
|||
// GetByVirtualMachine - The operation to get the run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine containing the run command.
|
||||
// - runCommandName - The name of the virtual machine run command.
|
||||
|
|
@ -333,7 +333,7 @@ func (client *VirtualMachineRunCommandsClient) getByVirtualMachineCreateRequest(
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
return req, nil
|
||||
|
|
@ -350,7 +350,7 @@ func (client *VirtualMachineRunCommandsClient) getByVirtualMachineHandleResponse
|
|||
|
||||
// NewListPager - Lists all available run commands for a subscription in a location.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The location upon which run commands is queried.
|
||||
// - options - VirtualMachineRunCommandsClientListOptions contains the optional parameters for the VirtualMachineRunCommandsClient.NewListPager
|
||||
// method.
|
||||
|
|
@ -393,7 +393,7 @@ func (client *VirtualMachineRunCommandsClient) listCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
return req, nil
|
||||
|
|
@ -410,7 +410,7 @@ func (client *VirtualMachineRunCommandsClient) listHandleResponse(resp *http.Res
|
|||
|
||||
// NewListByVirtualMachinePager - The operation to get all run commands of a Virtual Machine.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine containing the run command.
|
||||
// - options - VirtualMachineRunCommandsClientListByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.NewListByVirtualMachinePager
|
||||
|
|
@ -461,7 +461,7 @@ func (client *VirtualMachineRunCommandsClient) listByVirtualMachineCreateRequest
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
return req, nil
|
||||
|
|
@ -479,7 +479,7 @@ func (client *VirtualMachineRunCommandsClient) listByVirtualMachineHandleRespons
|
|||
// BeginUpdate - The operation to update the run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine where the run command should be updated.
|
||||
// - runCommandName - The name of the virtual machine run command.
|
||||
|
|
@ -506,7 +506,7 @@ func (client *VirtualMachineRunCommandsClient) BeginUpdate(ctx context.Context,
|
|||
// Update - The operation to update the run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineRunCommandsClient) update(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineRunCommandsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineRunCommandsClient.BeginUpdate"
|
||||
|
|
@ -552,7 +552,7 @@ func (client *VirtualMachineRunCommandsClient) updateCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCred
|
|||
// BeginAssessPatches - Assess patches on the VM.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginAssessPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginAssessPatches
|
||||
|
|
@ -74,7 +74,7 @@ func (client *VirtualMachinesClient) BeginAssessPatches(ctx context.Context, res
|
|||
// AssessPatches - Assess patches on the VM.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) assessPatches(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginAssessPatchesOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginAssessPatches"
|
||||
|
|
@ -116,17 +116,98 @@ func (client *VirtualMachinesClient) assessPatchesCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// BeginAttachDetachDataDisks - Attach and detach data disks to/from the virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - parameters - Parameters supplied to the attach and detach data disks operation on the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginAttachDetachDataDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginAttachDetachDataDisks
|
||||
// method.
|
||||
func (client *VirtualMachinesClient) BeginAttachDetachDataDisks(ctx context.Context, resourceGroupName string, vmName string, parameters AttachDetachDataDisksRequest, options *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*runtime.Poller[VirtualMachinesClientAttachDetachDataDisksResponse], error) {
|
||||
if options == nil || options.ResumeToken == "" {
|
||||
resp, err := client.attachDetachDataDisks(ctx, resourceGroupName, vmName, parameters, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientAttachDetachDataDisksResponse]{
|
||||
FinalStateVia: runtime.FinalStateViaLocation,
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientAttachDetachDataDisksResponse]{
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// AttachDetachDataDisks - Attach and detach data disks to/from the virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) attachDetachDataDisks(ctx context.Context, resourceGroupName string, vmName string, parameters AttachDetachDataDisksRequest, options *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginAttachDetachDataDisks"
|
||||
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
|
||||
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
req, err := client.attachDetachDataDisksCreateRequest(ctx, resourceGroupName, vmName, parameters, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
httpResp, err := client.internal.Pipeline().Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
|
||||
err = runtime.NewResponseError(httpResp)
|
||||
return nil, err
|
||||
}
|
||||
return httpResp, nil
|
||||
}
|
||||
|
||||
// attachDetachDataDisksCreateRequest creates the AttachDetachDataDisks request.
|
||||
func (client *VirtualMachinesClient) attachDetachDataDisksCreateRequest(ctx context.Context, resourceGroupName string, vmName string, parameters AttachDetachDataDisksRequest, options *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/attachDetachDataDisks"
|
||||
if resourceGroupName == "" {
|
||||
return nil, errors.New("parameter resourceGroupName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
|
||||
if vmName == "" {
|
||||
return nil, errors.New("parameter vmName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
|
||||
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// BeginCapture - Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create
|
||||
// similar VMs.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - parameters - Parameters supplied to the Capture Virtual Machine operation.
|
||||
|
|
@ -154,7 +235,7 @@ func (client *VirtualMachinesClient) BeginCapture(ctx context.Context, resourceG
|
|||
// VMs.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) capture(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineCaptureParameters, options *VirtualMachinesClientBeginCaptureOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginCapture"
|
||||
|
|
@ -196,7 +277,7 @@ func (client *VirtualMachinesClient) captureCreateRequest(ctx context.Context, r
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -209,7 +290,7 @@ func (client *VirtualMachinesClient) captureCreateRequest(ctx context.Context, r
|
|||
// before invoking this operation.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginConvertToManagedDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginConvertToManagedDisks
|
||||
|
|
@ -235,7 +316,7 @@ func (client *VirtualMachinesClient) BeginConvertToManagedDisks(ctx context.Cont
|
|||
// before invoking this operation.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) convertToManagedDisks(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginConvertToManagedDisksOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginConvertToManagedDisks"
|
||||
|
|
@ -277,7 +358,7 @@ func (client *VirtualMachinesClient) convertToManagedDisksCreateRequest(ctx cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -287,7 +368,7 @@ func (client *VirtualMachinesClient) convertToManagedDisksCreateRequest(ctx cont
|
|||
// during virtual machine creation.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - parameters - Parameters supplied to the Create Virtual Machine operation.
|
||||
|
|
@ -314,7 +395,7 @@ func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, re
|
|||
// virtual machine creation.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginCreateOrUpdate"
|
||||
|
|
@ -356,8 +437,14 @@ func (client *VirtualMachinesClient) createOrUpdateCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
if options != nil && options.IfMatch != nil {
|
||||
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
|
||||
}
|
||||
if options != nil && options.IfNoneMatch != nil {
|
||||
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
|
||||
}
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
return nil, err
|
||||
|
|
@ -369,7 +456,7 @@ func (client *VirtualMachinesClient) createOrUpdateCreateRequest(ctx context.Con
|
|||
// resources that this virtual machine uses.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginDeallocateOptions contains the optional parameters for the VirtualMachinesClient.BeginDeallocate
|
||||
|
|
@ -395,7 +482,7 @@ func (client *VirtualMachinesClient) BeginDeallocate(ctx context.Context, resour
|
|||
// that this virtual machine uses.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) deallocate(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeallocateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginDeallocate"
|
||||
|
|
@ -440,7 +527,7 @@ func (client *VirtualMachinesClient) deallocateCreateRequest(ctx context.Context
|
|||
if options != nil && options.Hibernate != nil {
|
||||
reqQP.Set("hibernate", strconv.FormatBool(*options.Hibernate))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -449,7 +536,7 @@ func (client *VirtualMachinesClient) deallocateCreateRequest(ctx context.Context
|
|||
// BeginDelete - The operation to delete a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete
|
||||
|
|
@ -474,7 +561,7 @@ func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGr
|
|||
// Delete - The operation to delete a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginDelete"
|
||||
|
|
@ -519,7 +606,7 @@ func (client *VirtualMachinesClient) deleteCreateRequest(ctx context.Context, re
|
|||
if options != nil && options.ForceDeletion != nil {
|
||||
reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -532,7 +619,7 @@ func (client *VirtualMachinesClient) deleteCreateRequest(ctx context.Context, re
|
|||
// [https://docs.microsoft.com/azure/virtual-machines/linux/capture-image].
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientGeneralizeOptions contains the optional parameters for the VirtualMachinesClient.Generalize
|
||||
|
|
@ -578,7 +665,7 @@ func (client *VirtualMachinesClient) generalizeCreateRequest(ctx context.Context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -587,7 +674,7 @@ func (client *VirtualMachinesClient) generalizeCreateRequest(ctx context.Context
|
|||
// Get - Retrieves information about the model view or the instance view of a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
|
||||
|
|
@ -636,7 +723,7 @@ func (client *VirtualMachinesClient) getCreateRequest(ctx context.Context, resou
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -654,7 +741,7 @@ func (client *VirtualMachinesClient) getHandleResponse(resp *http.Response) (Vir
|
|||
// BeginInstallPatches - Installs patches on the VM.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - installPatchesInput - Input for InstallPatches as directly received by the API
|
||||
|
|
@ -681,7 +768,7 @@ func (client *VirtualMachinesClient) BeginInstallPatches(ctx context.Context, re
|
|||
// InstallPatches - Installs patches on the VM.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) installPatches(ctx context.Context, resourceGroupName string, vmName string, installPatchesInput VirtualMachineInstallPatchesParameters, options *VirtualMachinesClientBeginInstallPatchesOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginInstallPatches"
|
||||
|
|
@ -723,7 +810,7 @@ func (client *VirtualMachinesClient) installPatchesCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, installPatchesInput); err != nil {
|
||||
|
|
@ -735,7 +822,7 @@ func (client *VirtualMachinesClient) installPatchesCreateRequest(ctx context.Con
|
|||
// InstanceView - Retrieves information about the run-time state of a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientInstanceViewOptions contains the optional parameters for the VirtualMachinesClient.InstanceView
|
||||
|
|
@ -782,7 +869,7 @@ func (client *VirtualMachinesClient) instanceViewCreateRequest(ctx context.Conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -800,7 +887,7 @@ func (client *VirtualMachinesClient) instanceViewHandleResponse(resp *http.Respo
|
|||
// NewListPager - Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response
|
||||
// to get the next page of virtual machines.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.NewListPager
|
||||
// method.
|
||||
|
|
@ -849,7 +936,7 @@ func (client *VirtualMachinesClient) listCreateRequest(ctx context.Context, reso
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -867,7 +954,7 @@ func (client *VirtualMachinesClient) listHandleResponse(resp *http.Response) (Vi
|
|||
// NewListAllPager - Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response
|
||||
// to get the next page of virtual machines.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - VirtualMachinesClientListAllOptions contains the optional parameters for the VirtualMachinesClient.NewListAllPager
|
||||
// method.
|
||||
func (client *VirtualMachinesClient) NewListAllPager(options *VirtualMachinesClientListAllOptions) *runtime.Pager[VirtualMachinesClientListAllResponse] {
|
||||
|
|
@ -905,7 +992,7 @@ func (client *VirtualMachinesClient) listAllCreateRequest(ctx context.Context, o
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
if options != nil && options.StatusOnly != nil {
|
||||
reqQP.Set("statusOnly", *options.StatusOnly)
|
||||
}
|
||||
|
|
@ -931,7 +1018,7 @@ func (client *VirtualMachinesClient) listAllHandleResponse(resp *http.Response)
|
|||
|
||||
// NewListAvailableSizesPager - Lists all available virtual machine sizes to which the specified virtual machine can be resized.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientListAvailableSizesOptions contains the optional parameters for the VirtualMachinesClient.NewListAvailableSizesPager
|
||||
|
|
@ -980,7 +1067,7 @@ func (client *VirtualMachinesClient) listAvailableSizesCreateRequest(ctx context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -997,7 +1084,7 @@ func (client *VirtualMachinesClient) listAvailableSizesHandleResponse(resp *http
|
|||
|
||||
// NewListByLocationPager - Gets all the virtual machines under the specified subscription for the specified location.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The location for which virtual machines under the subscription are queried.
|
||||
// - options - VirtualMachinesClientListByLocationOptions contains the optional parameters for the VirtualMachinesClient.NewListByLocationPager
|
||||
// method.
|
||||
|
|
@ -1040,7 +1127,7 @@ func (client *VirtualMachinesClient) listByLocationCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1058,7 +1145,7 @@ func (client *VirtualMachinesClient) listByLocationHandleResponse(resp *http.Res
|
|||
// BeginPerformMaintenance - The operation to perform maintenance on a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachinesClient.BeginPerformMaintenance
|
||||
|
|
@ -1083,7 +1170,7 @@ func (client *VirtualMachinesClient) BeginPerformMaintenance(ctx context.Context
|
|||
// PerformMaintenance - The operation to perform maintenance on a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) performMaintenance(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPerformMaintenanceOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginPerformMaintenance"
|
||||
|
|
@ -1125,7 +1212,7 @@ func (client *VirtualMachinesClient) performMaintenanceCreateRequest(ctx context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1135,7 +1222,7 @@ func (client *VirtualMachinesClient) performMaintenanceCreateRequest(ctx context
|
|||
// provisioned resources. You are still charged for this virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff
|
||||
|
|
@ -1161,7 +1248,7 @@ func (client *VirtualMachinesClient) BeginPowerOff(ctx context.Context, resource
|
|||
// resources. You are still charged for this virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) powerOff(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPowerOffOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginPowerOff"
|
||||
|
|
@ -1206,7 +1293,7 @@ func (client *VirtualMachinesClient) powerOffCreateRequest(ctx context.Context,
|
|||
if options != nil && options.SkipShutdown != nil {
|
||||
reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1215,7 +1302,7 @@ func (client *VirtualMachinesClient) powerOffCreateRequest(ctx context.Context,
|
|||
// BeginReapply - The operation to reapply a virtual machine's state.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginReapplyOptions contains the optional parameters for the VirtualMachinesClient.BeginReapply
|
||||
|
|
@ -1240,7 +1327,7 @@ func (client *VirtualMachinesClient) BeginReapply(ctx context.Context, resourceG
|
|||
// Reapply - The operation to reapply a virtual machine's state.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) reapply(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReapplyOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginReapply"
|
||||
|
|
@ -1282,7 +1369,7 @@ func (client *VirtualMachinesClient) reapplyCreateRequest(ctx context.Context, r
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1291,7 +1378,7 @@ func (client *VirtualMachinesClient) reapplyCreateRequest(ctx context.Context, r
|
|||
// BeginRedeploy - Shuts down the virtual machine, moves it to a new node, and powers it back on.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy
|
||||
|
|
@ -1316,7 +1403,7 @@ func (client *VirtualMachinesClient) BeginRedeploy(ctx context.Context, resource
|
|||
// Redeploy - Shuts down the virtual machine, moves it to a new node, and powers it back on.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) redeploy(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRedeployOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginRedeploy"
|
||||
|
|
@ -1358,7 +1445,7 @@ func (client *VirtualMachinesClient) redeployCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1371,7 +1458,7 @@ func (client *VirtualMachinesClient) redeployCreateRequest(ctx context.Context,
|
|||
// will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage
|
||||
|
|
@ -1400,7 +1487,7 @@ func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceG
|
|||
// will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) reimage(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReimageOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginReimage"
|
||||
|
|
@ -1442,7 +1529,7 @@ func (client *VirtualMachinesClient) reimageCreateRequest(ctx context.Context, r
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.Parameters != nil {
|
||||
|
|
@ -1457,7 +1544,7 @@ func (client *VirtualMachinesClient) reimageCreateRequest(ctx context.Context, r
|
|||
// BeginRestart - The operation to restart a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart
|
||||
|
|
@ -1482,7 +1569,7 @@ func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceG
|
|||
// Restart - The operation to restart a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) restart(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRestartOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginRestart"
|
||||
|
|
@ -1524,7 +1611,7 @@ func (client *VirtualMachinesClient) restartCreateRequest(ctx context.Context, r
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1533,7 +1620,7 @@ func (client *VirtualMachinesClient) restartCreateRequest(ctx context.Context, r
|
|||
// RetrieveBootDiagnosticsData - The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachinesClient.RetrieveBootDiagnosticsData
|
||||
|
|
@ -1583,7 +1670,7 @@ func (client *VirtualMachinesClient) retrieveBootDiagnosticsDataCreateRequest(ct
|
|||
if options != nil && options.SasURIExpirationTimeInMinutes != nil {
|
||||
reqQP.Set("sasUriExpirationTimeInMinutes", strconv.FormatInt(int64(*options.SasURIExpirationTimeInMinutes), 10))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1601,7 +1688,7 @@ func (client *VirtualMachinesClient) retrieveBootDiagnosticsDataHandleResponse(r
|
|||
// BeginRunCommand - Run command on the VM.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - parameters - Parameters supplied to the Run command operation.
|
||||
|
|
@ -1628,7 +1715,7 @@ func (client *VirtualMachinesClient) BeginRunCommand(ctx context.Context, resour
|
|||
// RunCommand - Run command on the VM.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) runCommand(ctx context.Context, resourceGroupName string, vmName string, parameters RunCommandInput, options *VirtualMachinesClientBeginRunCommandOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginRunCommand"
|
||||
|
|
@ -1670,7 +1757,7 @@ func (client *VirtualMachinesClient) runCommandCreateRequest(ctx context.Context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -1682,7 +1769,7 @@ func (client *VirtualMachinesClient) runCommandCreateRequest(ctx context.Context
|
|||
// SimulateEviction - The operation to simulate the eviction of spot virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientSimulateEvictionOptions contains the optional parameters for the VirtualMachinesClient.SimulateEviction
|
||||
|
|
@ -1728,7 +1815,7 @@ func (client *VirtualMachinesClient) simulateEvictionCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1737,7 +1824,7 @@ func (client *VirtualMachinesClient) simulateEvictionCreateRequest(ctx context.C
|
|||
// BeginStart - The operation to start a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart
|
||||
|
|
@ -1762,7 +1849,7 @@ func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGro
|
|||
// Start - The operation to start a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) start(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginStartOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginStart"
|
||||
|
|
@ -1804,7 +1891,7 @@ func (client *VirtualMachinesClient) startCreateRequest(ctx context.Context, res
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1813,7 +1900,7 @@ func (client *VirtualMachinesClient) startCreateRequest(ctx context.Context, res
|
|||
// BeginUpdate - The operation to update a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmName - The name of the virtual machine.
|
||||
// - parameters - Parameters supplied to the Update Virtual Machine operation.
|
||||
|
|
@ -1839,7 +1926,7 @@ func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGr
|
|||
// Update - The operation to update a virtual machine.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachinesClient) update(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineUpdate, options *VirtualMachinesClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachinesClient.BeginUpdate"
|
||||
|
|
@ -1881,8 +1968,14 @@ func (client *VirtualMachinesClient) updateCreateRequest(ctx context.Context, re
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
if options != nil && options.IfMatch != nil {
|
||||
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
|
||||
}
|
||||
if options != nil && options.IfNoneMatch != nil {
|
||||
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
|
||||
}
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string, credential
|
|||
// BeginCreateOrUpdate - The operation to create or update an extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set where the extension should be create or updated.
|
||||
// - vmssExtensionName - The name of the VM scale set extension.
|
||||
|
|
@ -74,7 +74,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginCreateOrUpdate(ctx co
|
|||
// CreateOrUpdate - The operation to create or update an extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension, options *VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetExtensionsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -120,7 +120,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) createOrUpdateCreateReques
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
|
||||
|
|
@ -132,7 +132,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) createOrUpdateCreateReques
|
|||
// BeginDelete - The operation to delete the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set where the extension should be deleted.
|
||||
// - vmssExtensionName - The name of the VM scale set extension.
|
||||
|
|
@ -158,7 +158,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginDelete(ctx context.Co
|
|||
// Delete - The operation to delete the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, options *VirtualMachineScaleSetExtensionsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetExtensionsClient.BeginDelete"
|
||||
|
|
@ -204,7 +204,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) deleteCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -213,7 +213,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) deleteCreateRequest(ctx co
|
|||
// Get - The operation to get the extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set containing the extension.
|
||||
// - vmssExtensionName - The name of the VM scale set extension.
|
||||
|
|
@ -268,7 +268,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) getCreateRequest(ctx conte
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -285,7 +285,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) getHandleResponse(resp *ht
|
|||
|
||||
// NewListPager - Gets a list of all extensions in a VM scale set.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set containing the extension.
|
||||
// - options - VirtualMachineScaleSetExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.NewListPager
|
||||
|
|
@ -333,7 +333,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) listCreateRequest(ctx cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -351,7 +351,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) listHandleResponse(resp *h
|
|||
// BeginUpdate - The operation to update an extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set where the extension should be updated.
|
||||
// - vmssExtensionName - The name of the VM scale set extension.
|
||||
|
|
@ -378,7 +378,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) BeginUpdate(ctx context.Co
|
|||
// Update - The operation to update an extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetExtensionsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate, options *VirtualMachineScaleSetExtensionsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetExtensionsClient.BeginUpdate"
|
||||
|
|
@ -424,7 +424,7 @@ func (client *VirtualMachineScaleSetExtensionsClient) updateCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string, crede
|
|||
// BeginCancel - Cancels the current virtual machine scale set rolling upgrade.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginCancel
|
||||
|
|
@ -72,7 +72,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginCancel(ctx conte
|
|||
// Cancel - Cancels the current virtual machine scale set rolling upgrade.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetRollingUpgradesClient) cancel(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginCancel"
|
||||
|
|
@ -114,7 +114,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) cancelCreateRequest(c
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -123,7 +123,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) cancelCreateRequest(c
|
|||
// GetLatest - Gets the status of the latest virtual machine scale set rolling upgrade.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.GetLatest
|
||||
|
|
@ -170,7 +170,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) getLatestCreateReques
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -190,7 +190,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) getLatestHandleRespon
|
|||
// are not affected.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions contains the optional parameters
|
||||
|
|
@ -217,7 +217,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginStartExtensionUp
|
|||
// are not affected.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetRollingUpgradesClient) startExtensionUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginStartExtensionUpgrade"
|
||||
|
|
@ -259,7 +259,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) startExtensionUpgrade
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -270,7 +270,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) startExtensionUpgrade
|
|||
// affected.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions contains the optional parameters for the
|
||||
|
|
@ -297,7 +297,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginStartOSUpgrade(c
|
|||
// affected.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetRollingUpgradesClient) startOSUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginStartOSUpgrade"
|
||||
|
|
@ -339,7 +339,7 @@ func (client *VirtualMachineScaleSetRollingUpgradesClient) startOSUpgradeCreateR
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
|
|
@ -45,10 +45,94 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string, credential azcore.T
|
|||
return client, nil
|
||||
}
|
||||
|
||||
// BeginApproveRollingUpgrade - Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM
|
||||
// scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade
|
||||
// method.
|
||||
func (client *VirtualMachineScaleSetsClient) BeginApproveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetsClientApproveRollingUpgradeResponse], error) {
|
||||
if options == nil || options.ResumeToken == "" {
|
||||
resp, err := client.approveRollingUpgrade(ctx, resourceGroupName, vmScaleSetName, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientApproveRollingUpgradeResponse]{
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientApproveRollingUpgradeResponse]{
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// ApproveRollingUpgrade - Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale
|
||||
// set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) approveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade"
|
||||
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
|
||||
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
req, err := client.approveRollingUpgradeCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
httpResp, err := client.internal.Pipeline().Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
|
||||
err = runtime.NewResponseError(httpResp)
|
||||
return nil, err
|
||||
}
|
||||
return httpResp, nil
|
||||
}
|
||||
|
||||
// approveRollingUpgradeCreateRequest creates the ApproveRollingUpgrade request.
|
||||
func (client *VirtualMachineScaleSetsClient) approveRollingUpgradeCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/approveRollingUpgrade"
|
||||
if resourceGroupName == "" {
|
||||
return nil, errors.New("parameter resourceGroupName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
|
||||
if vmScaleSetName == "" {
|
||||
return nil, errors.New("parameter vmScaleSetName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
|
||||
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMInstanceIDs != nil {
|
||||
if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return req, nil
|
||||
}
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// ConvertToSinglePlacementGroup - Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the virtual machine scale set to create or update.
|
||||
// - parameters - The input object for ConvertToSinglePlacementGroup API.
|
||||
|
|
@ -95,7 +179,7 @@ func (client *VirtualMachineScaleSetsClient) convertToSinglePlacementGroupCreate
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -107,7 +191,7 @@ func (client *VirtualMachineScaleSetsClient) convertToSinglePlacementGroupCreate
|
|||
// BeginCreateOrUpdate - Create or update a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set to create or update.
|
||||
// - parameters - The scale set object.
|
||||
|
|
@ -133,7 +217,7 @@ func (client *VirtualMachineScaleSetsClient) BeginCreateOrUpdate(ctx context.Con
|
|||
// CreateOrUpdate - Create or update a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSet, options *VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -175,8 +259,14 @@ func (client *VirtualMachineScaleSetsClient) createOrUpdateCreateRequest(ctx con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
if options != nil && options.IfMatch != nil {
|
||||
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
|
||||
}
|
||||
if options != nil && options.IfNoneMatch != nil {
|
||||
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
|
||||
}
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
return nil, err
|
||||
|
|
@ -189,7 +279,7 @@ func (client *VirtualMachineScaleSetsClient) createOrUpdateCreateRequest(ctx con
|
|||
// scale set deallocates.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeallocate
|
||||
|
|
@ -216,7 +306,7 @@ func (client *VirtualMachineScaleSetsClient) BeginDeallocate(ctx context.Context
|
|||
// scale set deallocates.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) deallocate(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeallocateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginDeallocate"
|
||||
|
|
@ -261,7 +351,7 @@ func (client *VirtualMachineScaleSetsClient) deallocateCreateRequest(ctx context
|
|||
if options != nil && options.Hibernate != nil {
|
||||
reqQP.Set("hibernate", strconv.FormatBool(*options.Hibernate))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMInstanceIDs != nil {
|
||||
|
|
@ -276,7 +366,7 @@ func (client *VirtualMachineScaleSetsClient) deallocateCreateRequest(ctx context
|
|||
// BeginDelete - Deletes a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDelete
|
||||
|
|
@ -301,7 +391,7 @@ func (client *VirtualMachineScaleSetsClient) BeginDelete(ctx context.Context, re
|
|||
// Delete - Deletes a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginDelete"
|
||||
|
|
@ -346,7 +436,7 @@ func (client *VirtualMachineScaleSetsClient) deleteCreateRequest(ctx context.Con
|
|||
if options != nil && options.ForceDeletion != nil {
|
||||
reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -355,7 +445,7 @@ func (client *VirtualMachineScaleSetsClient) deleteCreateRequest(ctx context.Con
|
|||
// BeginDeleteInstances - Deletes virtual machines in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - vmInstanceIDs - A list of virtual machine instance IDs from the VM scale set.
|
||||
|
|
@ -381,7 +471,7 @@ func (client *VirtualMachineScaleSetsClient) BeginDeleteInstances(ctx context.Co
|
|||
// DeleteInstances - Deletes virtual machines in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) deleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginDeleteInstancesOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginDeleteInstances"
|
||||
|
|
@ -426,7 +516,7 @@ func (client *VirtualMachineScaleSetsClient) deleteInstancesCreateRequest(ctx co
|
|||
if options != nil && options.ForceDeletion != nil {
|
||||
reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, vmInstanceIDs); err != nil {
|
||||
|
|
@ -439,7 +529,7 @@ func (client *VirtualMachineScaleSetsClient) deleteInstancesCreateRequest(ctx co
|
|||
// service fabric virtual machine scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - platformUpdateDomain - The platform update domain for which a manual recovery walk is requested
|
||||
|
|
@ -487,7 +577,7 @@ func (client *VirtualMachineScaleSetsClient) forceRecoveryServiceFabricPlatformU
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
reqQP.Set("platformUpdateDomain", strconv.FormatInt(int64(platformUpdateDomain), 10))
|
||||
if options != nil && options.Zone != nil {
|
||||
reqQP.Set("zone", *options.Zone)
|
||||
|
|
@ -512,7 +602,7 @@ func (client *VirtualMachineScaleSetsClient) forceRecoveryServiceFabricPlatformU
|
|||
// Get - Display information about a virtual machine scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetsClient.Get
|
||||
|
|
@ -559,7 +649,7 @@ func (client *VirtualMachineScaleSetsClient) getCreateRequest(ctx context.Contex
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
|
|
@ -580,7 +670,7 @@ func (client *VirtualMachineScaleSetsClient) getHandleResponse(resp *http.Respon
|
|||
// GetInstanceView - Gets the status of a VM scale set instance.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetsClient.GetInstanceView
|
||||
|
|
@ -627,7 +717,7 @@ func (client *VirtualMachineScaleSetsClient) getInstanceViewCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -644,7 +734,7 @@ func (client *VirtualMachineScaleSetsClient) getInstanceViewHandleResponse(resp
|
|||
|
||||
// NewGetOSUpgradeHistoryPager - Gets list of OS upgrades on a VM scale set instance.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewGetOSUpgradeHistoryPager
|
||||
|
|
@ -692,7 +782,7 @@ func (client *VirtualMachineScaleSetsClient) getOSUpgradeHistoryCreateRequest(ct
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -709,7 +799,7 @@ func (client *VirtualMachineScaleSetsClient) getOSUpgradeHistoryHandleResponse(r
|
|||
|
||||
// NewListPager - Gets a list of all VM scale sets under a resource group.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - options - VirtualMachineScaleSetsClientListOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListPager
|
||||
// method.
|
||||
|
|
@ -752,7 +842,7 @@ func (client *VirtualMachineScaleSetsClient) listCreateRequest(ctx context.Conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -771,7 +861,7 @@ func (client *VirtualMachineScaleSetsClient) listHandleResponse(resp *http.Respo
|
|||
// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is
|
||||
// null to fetch all the VM Scale Sets.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - options - VirtualMachineScaleSetsClientListAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListAllPager
|
||||
// method.
|
||||
func (client *VirtualMachineScaleSetsClient) NewListAllPager(options *VirtualMachineScaleSetsClientListAllOptions) *runtime.Pager[VirtualMachineScaleSetsClientListAllResponse] {
|
||||
|
|
@ -809,7 +899,7 @@ func (client *VirtualMachineScaleSetsClient) listAllCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -826,7 +916,7 @@ func (client *VirtualMachineScaleSetsClient) listAllHandleResponse(resp *http.Re
|
|||
|
||||
// NewListByLocationPager - Gets all the VM scale sets under the specified subscription for the specified location.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The location for which VM scale sets under the subscription are queried.
|
||||
// - options - VirtualMachineScaleSetsClientListByLocationOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListByLocationPager
|
||||
// method.
|
||||
|
|
@ -869,7 +959,7 @@ func (client *VirtualMachineScaleSetsClient) listByLocationCreateRequest(ctx con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -887,7 +977,7 @@ func (client *VirtualMachineScaleSetsClient) listByLocationHandleResponse(resp *
|
|||
// NewListSKUsPager - Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances
|
||||
// allowed for each SKU.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientListSKUsOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListSKUsPager
|
||||
|
|
@ -935,7 +1025,7 @@ func (client *VirtualMachineScaleSetsClient) listSKUsCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -955,7 +1045,7 @@ func (client *VirtualMachineScaleSetsClient) listSKUsHandleResponse(resp *http.R
|
|||
// details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPerformMaintenance
|
||||
|
|
@ -982,7 +1072,7 @@ func (client *VirtualMachineScaleSetsClient) BeginPerformMaintenance(ctx context
|
|||
// details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) performMaintenance(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginPerformMaintenance"
|
||||
|
|
@ -1024,7 +1114,7 @@ func (client *VirtualMachineScaleSetsClient) performMaintenanceCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMInstanceIDs != nil {
|
||||
|
|
@ -1041,7 +1131,7 @@ func (client *VirtualMachineScaleSetsClient) performMaintenanceCreateRequest(ctx
|
|||
// avoid charges.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPowerOff
|
||||
|
|
@ -1068,7 +1158,7 @@ func (client *VirtualMachineScaleSetsClient) BeginPowerOff(ctx context.Context,
|
|||
// avoid charges.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) powerOff(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPowerOffOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginPowerOff"
|
||||
|
|
@ -1113,7 +1203,7 @@ func (client *VirtualMachineScaleSetsClient) powerOffCreateRequest(ctx context.C
|
|||
if options != nil && options.SkipShutdown != nil {
|
||||
reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMInstanceIDs != nil {
|
||||
|
|
@ -1128,7 +1218,7 @@ func (client *VirtualMachineScaleSetsClient) powerOffCreateRequest(ctx context.C
|
|||
// BeginReapply - Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginReapplyOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReapply
|
||||
|
|
@ -1154,7 +1244,7 @@ func (client *VirtualMachineScaleSetsClient) BeginReapply(ctx context.Context, r
|
|||
// Reapply - Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) reapply(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReapplyOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginReapply"
|
||||
|
|
@ -1196,7 +1286,7 @@ func (client *VirtualMachineScaleSetsClient) reapplyCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1206,7 +1296,7 @@ func (client *VirtualMachineScaleSetsClient) reapplyCreateRequest(ctx context.Co
|
|||
// them back on.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRedeploy
|
||||
|
|
@ -1232,7 +1322,7 @@ func (client *VirtualMachineScaleSetsClient) BeginRedeploy(ctx context.Context,
|
|||
// back on.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) redeploy(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRedeployOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginRedeploy"
|
||||
|
|
@ -1274,7 +1364,7 @@ func (client *VirtualMachineScaleSetsClient) redeployCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMInstanceIDs != nil {
|
||||
|
|
@ -1291,7 +1381,7 @@ func (client *VirtualMachineScaleSetsClient) redeployCreateRequest(ctx context.C
|
|||
// reset to initial state.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimage
|
||||
|
|
@ -1318,7 +1408,7 @@ func (client *VirtualMachineScaleSetsClient) BeginReimage(ctx context.Context, r
|
|||
// reset to initial state.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) reimage(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginReimage"
|
||||
|
|
@ -1360,7 +1450,7 @@ func (client *VirtualMachineScaleSetsClient) reimageCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMScaleSetReimageInput != nil {
|
||||
|
|
@ -1376,7 +1466,7 @@ func (client *VirtualMachineScaleSetsClient) reimageCreateRequest(ctx context.Co
|
|||
// is only supported for managed disks.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimageAll
|
||||
|
|
@ -1402,7 +1492,7 @@ func (client *VirtualMachineScaleSetsClient) BeginReimageAll(ctx context.Context
|
|||
// is only supported for managed disks.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) reimageAll(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageAllOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginReimageAll"
|
||||
|
|
@ -1444,7 +1534,7 @@ func (client *VirtualMachineScaleSetsClient) reimageAllCreateRequest(ctx context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMInstanceIDs != nil {
|
||||
|
|
@ -1459,7 +1549,7 @@ func (client *VirtualMachineScaleSetsClient) reimageAllCreateRequest(ctx context
|
|||
// BeginRestart - Restarts one or more virtual machines in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRestart
|
||||
|
|
@ -1484,7 +1574,7 @@ func (client *VirtualMachineScaleSetsClient) BeginRestart(ctx context.Context, r
|
|||
// Restart - Restarts one or more virtual machines in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) restart(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRestartOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginRestart"
|
||||
|
|
@ -1526,7 +1616,7 @@ func (client *VirtualMachineScaleSetsClient) restartCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMInstanceIDs != nil {
|
||||
|
|
@ -1541,7 +1631,7 @@ func (client *VirtualMachineScaleSetsClient) restartCreateRequest(ctx context.Co
|
|||
// BeginSetOrchestrationServiceState - Changes ServiceState property for a given service
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the virtual machine scale set to create or update.
|
||||
// - parameters - The input object for SetOrchestrationServiceState API.
|
||||
|
|
@ -1567,7 +1657,7 @@ func (client *VirtualMachineScaleSetsClient) BeginSetOrchestrationServiceState(c
|
|||
// SetOrchestrationServiceState - Changes ServiceState property for a given service
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) setOrchestrationServiceState(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters OrchestrationServiceStateInput, options *VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginSetOrchestrationServiceState"
|
||||
|
|
@ -1609,7 +1699,7 @@ func (client *VirtualMachineScaleSetsClient) setOrchestrationServiceStateCreateR
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -1621,7 +1711,7 @@ func (client *VirtualMachineScaleSetsClient) setOrchestrationServiceStateCreateR
|
|||
// BeginStart - Starts one or more virtual machines in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginStart
|
||||
|
|
@ -1646,7 +1736,7 @@ func (client *VirtualMachineScaleSetsClient) BeginStart(ctx context.Context, res
|
|||
// Start - Starts one or more virtual machines in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) start(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginStartOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginStart"
|
||||
|
|
@ -1688,7 +1778,7 @@ func (client *VirtualMachineScaleSetsClient) startCreateRequest(ctx context.Cont
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMInstanceIDs != nil {
|
||||
|
|
@ -1703,7 +1793,7 @@ func (client *VirtualMachineScaleSetsClient) startCreateRequest(ctx context.Cont
|
|||
// BeginUpdate - Update a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set to create or update.
|
||||
// - parameters - The scale set object.
|
||||
|
|
@ -1729,7 +1819,7 @@ func (client *VirtualMachineScaleSetsClient) BeginUpdate(ctx context.Context, re
|
|||
// Update - Update a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSetUpdate, options *VirtualMachineScaleSetsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginUpdate"
|
||||
|
|
@ -1771,8 +1861,14 @@ func (client *VirtualMachineScaleSetsClient) updateCreateRequest(ctx context.Con
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
if options != nil && options.IfMatch != nil {
|
||||
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
|
||||
}
|
||||
if options != nil && options.IfNoneMatch != nil {
|
||||
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
|
||||
}
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
return nil, err
|
||||
|
|
@ -1783,7 +1879,7 @@ func (client *VirtualMachineScaleSetsClient) updateCreateRequest(ctx context.Con
|
|||
// BeginUpdateInstances - Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - vmInstanceIDs - A list of virtual machine instance IDs from the VM scale set.
|
||||
|
|
@ -1809,7 +1905,7 @@ func (client *VirtualMachineScaleSetsClient) BeginUpdateInstances(ctx context.Co
|
|||
// UpdateInstances - Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetsClient) updateInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginUpdateInstancesOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetsClient.BeginUpdateInstances"
|
||||
|
|
@ -1851,7 +1947,7 @@ func (client *VirtualMachineScaleSetsClient) updateInstancesCreateRequest(ctx co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, vmInstanceIDs); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string, credenti
|
|||
// BeginCreateOrUpdate - The operation to create or update the VMSS VM extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -75,7 +75,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginCreateOrUpdate(ctx
|
|||
// CreateOrUpdate - The operation to create or update the VMSS VM extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension, options *VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -125,7 +125,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) createOrUpdateCreateRequ
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
|
||||
|
|
@ -137,7 +137,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) createOrUpdateCreateRequ
|
|||
// BeginDelete - The operation to delete the VMSS VM extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -164,7 +164,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginDelete(ctx context.
|
|||
// Delete - The operation to delete the VMSS VM extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, options *VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginDelete"
|
||||
|
|
@ -214,7 +214,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) deleteCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -223,7 +223,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) deleteCreateRequest(ctx
|
|||
// Get - The operation to get the VMSS VM extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -283,7 +283,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) getCreateRequest(ctx con
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -301,7 +301,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) getHandleResponse(resp *
|
|||
// List - The operation to get all extensions of an instance in Virtual Machine Scaleset.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -356,7 +356,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) listCreateRequest(ctx co
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -374,7 +374,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) listHandleResponse(resp
|
|||
// BeginUpdate - The operation to update the VMSS VM extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -402,7 +402,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) BeginUpdate(ctx context.
|
|||
// Update - The operation to update the VMSS VM extension.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMExtensionsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate, options *VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginUpdate"
|
||||
|
|
@ -452,7 +452,7 @@ func (client *VirtualMachineScaleSetVMExtensionsClient) updateCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func NewVirtualMachineScaleSetVMRunCommandsClient(subscriptionID string, credent
|
|||
// BeginCreateOrUpdate - The operation to create or update the VMSS VM run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -75,7 +75,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginCreateOrUpdate(ctx
|
|||
// CreateOrUpdate - The operation to create or update the VMSS VM run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMRunCommandsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginCreateOrUpdate"
|
||||
|
|
@ -125,7 +125,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) createOrUpdateCreateReq
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
|
||||
|
|
@ -137,7 +137,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) createOrUpdateCreateReq
|
|||
// BeginDelete - The operation to delete the VMSS VM run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -164,7 +164,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginDelete(ctx context
|
|||
// Delete - The operation to delete the VMSS VM run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMRunCommandsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, options *VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginDelete"
|
||||
|
|
@ -214,7 +214,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) deleteCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
return req, nil
|
||||
|
|
@ -223,7 +223,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) deleteCreateRequest(ctx
|
|||
// Get - The operation to get the VMSS VM run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -283,7 +283,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) getCreateRequest(ctx co
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
return req, nil
|
||||
|
|
@ -300,7 +300,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) getHandleResponse(resp
|
|||
|
||||
// NewListPager - The operation to get all run commands of an instance in Virtual Machine Scaleset.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -356,7 +356,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) listCreateRequest(ctx c
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
return req, nil
|
||||
|
|
@ -374,7 +374,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) listHandleResponse(resp
|
|||
// BeginUpdate - The operation to update the VMSS VM run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -402,7 +402,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginUpdate(ctx context
|
|||
// Update - The operation to update the VMSS VM run command.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMRunCommandsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginUpdate"
|
||||
|
|
@ -452,7 +452,7 @@ func (client *VirtualMachineScaleSetVMRunCommandsClient) updateCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
|
||||
|
|
|
|||
|
|
@ -45,12 +45,179 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string, credential azcore
|
|||
return client, nil
|
||||
}
|
||||
|
||||
// BeginApproveRollingUpgrade - Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
// - options - VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade
|
||||
// method.
|
||||
func (client *VirtualMachineScaleSetVMsClient) BeginApproveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse], error) {
|
||||
if options == nil || options.ResumeToken == "" {
|
||||
resp, err := client.approveRollingUpgrade(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse]{
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse]{
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// ApproveRollingUpgrade - Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) approveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade"
|
||||
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
|
||||
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
req, err := client.approveRollingUpgradeCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
httpResp, err := client.internal.Pipeline().Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
|
||||
err = runtime.NewResponseError(httpResp)
|
||||
return nil, err
|
||||
}
|
||||
return httpResp, nil
|
||||
}
|
||||
|
||||
// approveRollingUpgradeCreateRequest creates the ApproveRollingUpgrade request.
|
||||
func (client *VirtualMachineScaleSetVMsClient) approveRollingUpgradeCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/approveRollingUpgrade"
|
||||
if resourceGroupName == "" {
|
||||
return nil, errors.New("parameter resourceGroupName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
|
||||
if vmScaleSetName == "" {
|
||||
return nil, errors.New("parameter vmScaleSetName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
|
||||
if instanceID == "" {
|
||||
return nil, errors.New("parameter instanceID cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
|
||||
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// BeginAttachDetachDataDisks - Attach and detach data disks to/from a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
// - parameters - Parameters supplied to the attach and detach data disks operation on a Virtual Machine Scale Sets VM.
|
||||
// - options - VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks
|
||||
// method.
|
||||
func (client *VirtualMachineScaleSetVMsClient) BeginAttachDetachDataDisks(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters AttachDetachDataDisksRequest, options *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse], error) {
|
||||
if options == nil || options.ResumeToken == "" {
|
||||
resp, err := client.attachDetachDataDisks(ctx, resourceGroupName, vmScaleSetName, instanceID, parameters, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse]{
|
||||
FinalStateVia: runtime.FinalStateViaLocation,
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
return poller, err
|
||||
} else {
|
||||
return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse]{
|
||||
Tracer: client.internal.Tracer(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// AttachDetachDataDisks - Attach and detach data disks to/from a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) attachDetachDataDisks(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters AttachDetachDataDisksRequest, options *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks"
|
||||
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
|
||||
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
|
||||
defer func() { endSpan(err) }()
|
||||
req, err := client.attachDetachDataDisksCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, parameters, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
httpResp, err := client.internal.Pipeline().Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
|
||||
err = runtime.NewResponseError(httpResp)
|
||||
return nil, err
|
||||
}
|
||||
return httpResp, nil
|
||||
}
|
||||
|
||||
// attachDetachDataDisksCreateRequest creates the AttachDetachDataDisks request.
|
||||
func (client *VirtualMachineScaleSetVMsClient) attachDetachDataDisksCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters AttachDetachDataDisksRequest, options *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*policy.Request, error) {
|
||||
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/attachDetachDataDisks"
|
||||
if resourceGroupName == "" {
|
||||
return nil, errors.New("parameter resourceGroupName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
|
||||
if vmScaleSetName == "" {
|
||||
return nil, errors.New("parameter vmScaleSetName cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
|
||||
if instanceID == "" {
|
||||
return nil, errors.New("parameter instanceID cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
|
||||
if client.subscriptionID == "" {
|
||||
return nil, errors.New("parameter client.subscriptionID cannot be empty")
|
||||
}
|
||||
urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
|
||||
req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return req, nil
|
||||
}
|
||||
|
||||
// BeginDeallocate - Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases
|
||||
// the compute resources it uses. You are not billed for the compute resources of this virtual
|
||||
// machine once it is deallocated.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -78,7 +245,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginDeallocate(ctx context.Conte
|
|||
// machine once it is deallocated.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) deallocate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeallocateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginDeallocate"
|
||||
|
|
@ -124,7 +291,7 @@ func (client *VirtualMachineScaleSetVMsClient) deallocateCreateRequest(ctx conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -133,7 +300,7 @@ func (client *VirtualMachineScaleSetVMsClient) deallocateCreateRequest(ctx conte
|
|||
// BeginDelete - Deletes a virtual machine from a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -159,7 +326,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginDelete(ctx context.Context,
|
|||
// Delete - Deletes a virtual machine from a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeleteOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginDelete"
|
||||
|
|
@ -208,7 +375,7 @@ func (client *VirtualMachineScaleSetVMsClient) deleteCreateRequest(ctx context.C
|
|||
if options != nil && options.ForceDeletion != nil {
|
||||
reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -217,7 +384,7 @@ func (client *VirtualMachineScaleSetVMsClient) deleteCreateRequest(ctx context.C
|
|||
// Get - Gets a virtual machine from a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -272,7 +439,7 @@ func (client *VirtualMachineScaleSetVMsClient) getCreateRequest(ctx context.Cont
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", string(*options.Expand))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -290,7 +457,7 @@ func (client *VirtualMachineScaleSetVMsClient) getHandleResponse(resp *http.Resp
|
|||
// GetInstanceView - Gets the status of a virtual machine from a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -342,7 +509,7 @@ func (client *VirtualMachineScaleSetVMsClient) getInstanceViewCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -359,7 +526,7 @@ func (client *VirtualMachineScaleSetVMsClient) getInstanceViewHandleResponse(res
|
|||
|
||||
// NewListPager - Gets a list of all virtual machines in a VM scale sets.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - virtualMachineScaleSetName - The name of the VM scale set.
|
||||
// - options - VirtualMachineScaleSetVMsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.NewListPager
|
||||
|
|
@ -416,7 +583,7 @@ func (client *VirtualMachineScaleSetVMsClient) listCreateRequest(ctx context.Con
|
|||
if options != nil && options.Expand != nil {
|
||||
reqQP.Set("$expand", *options.Expand)
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -434,7 +601,7 @@ func (client *VirtualMachineScaleSetVMsClient) listHandleResponse(resp *http.Res
|
|||
// BeginPerformMaintenance - Performs maintenance on a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -460,7 +627,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginPerformMaintenance(ctx conte
|
|||
// PerformMaintenance - Performs maintenance on a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) performMaintenance(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginPerformMaintenance"
|
||||
|
|
@ -506,7 +673,7 @@ func (client *VirtualMachineScaleSetVMsClient) performMaintenanceCreateRequest(c
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -517,7 +684,7 @@ func (client *VirtualMachineScaleSetVMsClient) performMaintenanceCreateRequest(c
|
|||
// charges.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -545,7 +712,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginPowerOff(ctx context.Context
|
|||
// charges.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) powerOff(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPowerOffOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginPowerOff"
|
||||
|
|
@ -594,7 +761,7 @@ func (client *VirtualMachineScaleSetVMsClient) powerOffCreateRequest(ctx context
|
|||
if options != nil && options.SkipShutdown != nil {
|
||||
reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -604,7 +771,7 @@ func (client *VirtualMachineScaleSetVMsClient) powerOffCreateRequest(ctx context
|
|||
// back on.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -631,7 +798,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRedeploy(ctx context.Context
|
|||
// on.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) redeploy(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRedeployOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginRedeploy"
|
||||
|
|
@ -677,7 +844,7 @@ func (client *VirtualMachineScaleSetVMsClient) redeployCreateRequest(ctx context
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -686,7 +853,7 @@ func (client *VirtualMachineScaleSetVMsClient) redeployCreateRequest(ctx context
|
|||
// BeginReimage - Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -712,7 +879,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginReimage(ctx context.Context,
|
|||
// Reimage - Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) reimage(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginReimage"
|
||||
|
|
@ -758,7 +925,7 @@ func (client *VirtualMachineScaleSetVMsClient) reimageCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if options != nil && options.VMScaleSetVMReimageInput != nil {
|
||||
|
|
@ -774,7 +941,7 @@ func (client *VirtualMachineScaleSetVMsClient) reimageCreateRequest(ctx context.
|
|||
// is only supported for managed disks.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -801,7 +968,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginReimageAll(ctx context.Conte
|
|||
// is only supported for managed disks.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) reimageAll(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageAllOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginReimageAll"
|
||||
|
|
@ -847,7 +1014,7 @@ func (client *VirtualMachineScaleSetVMsClient) reimageAllCreateRequest(ctx conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -856,7 +1023,7 @@ func (client *VirtualMachineScaleSetVMsClient) reimageAllCreateRequest(ctx conte
|
|||
// BeginRestart - Restarts a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -882,7 +1049,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRestart(ctx context.Context,
|
|||
// Restart - Restarts a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) restart(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRestartOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginRestart"
|
||||
|
|
@ -928,7 +1095,7 @@ func (client *VirtualMachineScaleSetVMsClient) restartCreateRequest(ctx context.
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -938,7 +1105,7 @@ func (client *VirtualMachineScaleSetVMsClient) restartCreateRequest(ctx context.
|
|||
// scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -993,7 +1160,7 @@ func (client *VirtualMachineScaleSetVMsClient) retrieveBootDiagnosticsDataCreate
|
|||
if options != nil && options.SasURIExpirationTimeInMinutes != nil {
|
||||
reqQP.Set("sasUriExpirationTimeInMinutes", strconv.FormatInt(int64(*options.SasURIExpirationTimeInMinutes), 10))
|
||||
}
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1011,7 +1178,7 @@ func (client *VirtualMachineScaleSetVMsClient) retrieveBootDiagnosticsDataHandle
|
|||
// BeginRunCommand - Run command on a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -1039,7 +1206,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginRunCommand(ctx context.Conte
|
|||
// RunCommand - Run command on a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) runCommand(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters RunCommandInput, options *VirtualMachineScaleSetVMsClientBeginRunCommandOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginRunCommand"
|
||||
|
|
@ -1085,7 +1252,7 @@ func (client *VirtualMachineScaleSetVMsClient) runCommandCreateRequest(ctx conte
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json, text/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
|
|
@ -1097,7 +1264,7 @@ func (client *VirtualMachineScaleSetVMsClient) runCommandCreateRequest(ctx conte
|
|||
// SimulateEviction - The operation to simulate the eviction of spot virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -1148,7 +1315,7 @@ func (client *VirtualMachineScaleSetVMsClient) simulateEvictionCreateRequest(ctx
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1157,7 +1324,7 @@ func (client *VirtualMachineScaleSetVMsClient) simulateEvictionCreateRequest(ctx
|
|||
// BeginStart - Starts a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -1183,7 +1350,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginStart(ctx context.Context, r
|
|||
// Start - Starts a virtual machine in a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) start(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginStartOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginStart"
|
||||
|
|
@ -1229,7 +1396,7 @@ func (client *VirtualMachineScaleSetVMsClient) startCreateRequest(ctx context.Co
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
@ -1238,7 +1405,7 @@ func (client *VirtualMachineScaleSetVMsClient) startCreateRequest(ctx context.Co
|
|||
// BeginUpdate - Updates a virtual machine of a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - resourceGroupName - The name of the resource group.
|
||||
// - vmScaleSetName - The name of the VM scale set where the extension should be create or updated.
|
||||
// - instanceID - The instance ID of the virtual machine.
|
||||
|
|
@ -1265,7 +1432,7 @@ func (client *VirtualMachineScaleSetVMsClient) BeginUpdate(ctx context.Context,
|
|||
// Update - Updates a virtual machine of a VM scale set.
|
||||
// If the operation fails it returns an *azcore.ResponseError type.
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
func (client *VirtualMachineScaleSetVMsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM, options *VirtualMachineScaleSetVMsClientBeginUpdateOptions) (*http.Response, error) {
|
||||
var err error
|
||||
const operationName = "VirtualMachineScaleSetVMsClient.BeginUpdate"
|
||||
|
|
@ -1311,8 +1478,14 @@ func (client *VirtualMachineScaleSetVMsClient) updateCreateRequest(ctx context.C
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
if options != nil && options.IfMatch != nil {
|
||||
req.Raw().Header["If-Match"] = []string{*options.IfMatch}
|
||||
}
|
||||
if options != nil && options.IfNoneMatch != nil {
|
||||
req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
|
||||
}
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
if err := runtime.MarshalAsJSON(req, parameters); err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ func NewVirtualMachineSizesClient(subscriptionID string, credential azcore.Token
|
|||
|
||||
// NewListPager - This API is deprecated. Use Resources Skus [https://docs.microsoft.com/rest/api/compute/resourceskus/list]
|
||||
//
|
||||
// Generated from API version 2023-07-01
|
||||
// Generated from API version 2023-09-01
|
||||
// - location - The location upon which virtual-machine-sizes is queried.
|
||||
// - options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.NewListPager
|
||||
// method.
|
||||
|
|
@ -90,7 +90,7 @@ func (client *VirtualMachineSizesClient) listCreateRequest(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
reqQP := req.Raw().URL.Query()
|
||||
reqQP.Set("api-version", "2023-07-01")
|
||||
reqQP.Set("api-version", "2023-09-01")
|
||||
req.Raw().URL.RawQuery = reqQP.Encode()
|
||||
req.Raw().Header["Accept"] = []string{"application/json"}
|
||||
return req, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue