diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/CHANGELOG.md b/sdk/resourcemanager/appcontainers/armappcontainers/CHANGELOG.md index 8b023ece67d4..3172132ed802 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/CHANGELOG.md +++ b/sdk/resourcemanager/appcontainers/armappcontainers/CHANGELOG.md @@ -1,33 +1,85 @@ # Release History -## 2.0.0-beta.3 (2023-05-26) +## 2.0.0 (2023-08-25) ### Breaking Changes -- Type of `BillingMeterProperties.Category` has been changed from `*Category` to `*string` -- Type of `CustomDomainConfiguration.CertificatePassword` has been changed from `[]byte` to `*string` - Type of `DaprSecretsCollection.Value` has been changed from `[]*Secret` to `[]*DaprSecret` -- Enum `Category` has been removed -- Enum `ManagedEnvironmentOutBoundType` has been removed -- Enum `SKUName` has been removed -- Struct `EnvironmentSKUProperties` has been removed -- Struct `ManagedEnvironmentOutboundSettings` has been removed -- Field `BillingMeterCategory` of struct `AvailableWorkloadProfileProperties` has been removed -- Field `WorkloadProfileType` of struct `ContainerAppProperties` has been removed -- Field `SKU` of struct `ManagedEnvironment` has been removed -- Field `OutboundSettings`, `RuntimeSubnetID` of struct `VnetConfiguration` has been removed +- Struct `CustomHostnameAnalysisResultProperties` has been removed +- Field `ID`, `Name`, `Properties`, `SystemData`, `Type` of struct `CustomHostnameAnalysisResult` has been removed +- Field `RuntimeSubnetID` of struct `VnetConfiguration` has been removed ### Features Added +- New value `ContainerAppProvisioningStateDeleting` added to enum type `ContainerAppProvisioningState` +- New value `IngressTransportMethodTCP` added to enum type `IngressTransportMethod` - New value `StorageTypeSecret` added to enum type `StorageType` +- New enum type `Action` with values `ActionAllow`, `ActionDeny` - New enum type `Affinity` with values `AffinityNone`, `AffinitySticky` +- New enum type `Applicability` with values `ApplicabilityCustom`, `ApplicabilityLocationDefault` +- New enum type `ConnectedEnvironmentProvisioningState` with values `ConnectedEnvironmentProvisioningStateCanceled`, `ConnectedEnvironmentProvisioningStateFailed`, `ConnectedEnvironmentProvisioningStateInfrastructureSetupComplete`, `ConnectedEnvironmentProvisioningStateInfrastructureSetupInProgress`, `ConnectedEnvironmentProvisioningStateInitializationInProgress`, `ConnectedEnvironmentProvisioningStateScheduledForDelete`, `ConnectedEnvironmentProvisioningStateSucceeded`, `ConnectedEnvironmentProvisioningStateWaiting` +- New enum type `ContainerAppContainerRunningState` with values `ContainerAppContainerRunningStateRunning`, `ContainerAppContainerRunningStateTerminated`, `ContainerAppContainerRunningStateWaiting` +- New enum type `ContainerAppReplicaRunningState` with values `ContainerAppReplicaRunningStateNotRunning`, `ContainerAppReplicaRunningStateRunning`, `ContainerAppReplicaRunningStateUnknown` +- New enum type `ExtendedLocationTypes` with values `ExtendedLocationTypesCustomLocation` - New enum type `IngressClientCertificateMode` with values `IngressClientCertificateModeAccept`, `IngressClientCertificateModeIgnore`, `IngressClientCertificateModeRequire` - New enum type `JobExecutionRunningState` with values `JobExecutionRunningStateDegraded`, `JobExecutionRunningStateFailed`, `JobExecutionRunningStateProcessing`, `JobExecutionRunningStateRunning`, `JobExecutionRunningStateStopped`, `JobExecutionRunningStateSucceeded`, `JobExecutionRunningStateUnknown` - New enum type `JobProvisioningState` with values `JobProvisioningStateCanceled`, `JobProvisioningStateDeleting`, `JobProvisioningStateFailed`, `JobProvisioningStateInProgress`, `JobProvisioningStateSucceeded` +- New enum type `LogLevel` with values `LogLevelDebug`, `LogLevelError`, `LogLevelInfo`, `LogLevelWarn` - New enum type `ManagedCertificateDomainControlValidation` with values `ManagedCertificateDomainControlValidationCNAME`, `ManagedCertificateDomainControlValidationHTTP`, `ManagedCertificateDomainControlValidationTXT` -- New enum type `TriggerType` with values `TriggerTypeEvent`, `TriggerTypeManual`, `TriggerTypeScheduled` +- New enum type `RevisionRunningState` with values `RevisionRunningStateDegraded`, `RevisionRunningStateFailed`, `RevisionRunningStateProcessing`, `RevisionRunningStateRunning`, `RevisionRunningStateStopped`, `RevisionRunningStateUnknown` +- New enum type `TriggerType` with values `TriggerTypeEvent`, `TriggerTypeManual`, `TriggerTypeSchedule` +- New function `NewAvailableWorkloadProfilesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AvailableWorkloadProfilesClient, error)` +- New function `*AvailableWorkloadProfilesClient.NewGetPager(string, *AvailableWorkloadProfilesClientGetOptions) *runtime.Pager[AvailableWorkloadProfilesClientGetResponse]` +- New function `NewBillingMetersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BillingMetersClient, error)` +- New function `*BillingMetersClient.Get(context.Context, string, *BillingMetersClientGetOptions) (BillingMetersClientGetResponse, error)` +- New function `*ClientFactory.NewAvailableWorkloadProfilesClient() *AvailableWorkloadProfilesClient` +- New function `*ClientFactory.NewBillingMetersClient() *BillingMetersClient` +- New function `*ClientFactory.NewConnectedEnvironmentsCertificatesClient() *ConnectedEnvironmentsCertificatesClient` +- New function `*ClientFactory.NewConnectedEnvironmentsClient() *ConnectedEnvironmentsClient` +- New function `*ClientFactory.NewConnectedEnvironmentsDaprComponentsClient() *ConnectedEnvironmentsDaprComponentsClient` +- New function `*ClientFactory.NewConnectedEnvironmentsStoragesClient() *ConnectedEnvironmentsStoragesClient` +- New function `*ClientFactory.NewContainerAppsAPIClient() *ContainerAppsAPIClient` +- New function `*ClientFactory.NewContainerAppsDiagnosticsClient() *ContainerAppsDiagnosticsClient` - New function `*ClientFactory.NewJobsClient() *JobsClient` - New function `*ClientFactory.NewJobsExecutionsClient() *JobsExecutionsClient` - New function `*ClientFactory.NewManagedCertificatesClient() *ManagedCertificatesClient` +- New function `*ClientFactory.NewManagedEnvironmentDiagnosticsClient() *ManagedEnvironmentDiagnosticsClient` +- New function `*ClientFactory.NewManagedEnvironmentsDiagnosticsClient() *ManagedEnvironmentsDiagnosticsClient` +- New function `NewConnectedEnvironmentsCertificatesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectedEnvironmentsCertificatesClient, error)` +- New function `*ConnectedEnvironmentsCertificatesClient.CreateOrUpdate(context.Context, string, string, string, *ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions) (ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse, error)` +- New function `*ConnectedEnvironmentsCertificatesClient.Delete(context.Context, string, string, string, *ConnectedEnvironmentsCertificatesClientDeleteOptions) (ConnectedEnvironmentsCertificatesClientDeleteResponse, error)` +- New function `*ConnectedEnvironmentsCertificatesClient.Get(context.Context, string, string, string, *ConnectedEnvironmentsCertificatesClientGetOptions) (ConnectedEnvironmentsCertificatesClientGetResponse, error)` +- New function `*ConnectedEnvironmentsCertificatesClient.NewListPager(string, string, *ConnectedEnvironmentsCertificatesClientListOptions) *runtime.Pager[ConnectedEnvironmentsCertificatesClientListResponse]` +- New function `*ConnectedEnvironmentsCertificatesClient.Update(context.Context, string, string, string, CertificatePatch, *ConnectedEnvironmentsCertificatesClientUpdateOptions) (ConnectedEnvironmentsCertificatesClientUpdateResponse, error)` +- New function `NewConnectedEnvironmentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectedEnvironmentsClient, error)` +- New function `*ConnectedEnvironmentsClient.CheckNameAvailability(context.Context, string, string, CheckNameAvailabilityRequest, *ConnectedEnvironmentsClientCheckNameAvailabilityOptions) (ConnectedEnvironmentsClientCheckNameAvailabilityResponse, error)` +- New function `*ConnectedEnvironmentsClient.BeginCreateOrUpdate(context.Context, string, string, ConnectedEnvironment, *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConnectedEnvironmentsClientCreateOrUpdateResponse], error)` +- New function `*ConnectedEnvironmentsClient.BeginDelete(context.Context, string, string, *ConnectedEnvironmentsClientBeginDeleteOptions) (*runtime.Poller[ConnectedEnvironmentsClientDeleteResponse], error)` +- New function `*ConnectedEnvironmentsClient.Get(context.Context, string, string, *ConnectedEnvironmentsClientGetOptions) (ConnectedEnvironmentsClientGetResponse, error)` +- New function `*ConnectedEnvironmentsClient.NewListByResourceGroupPager(string, *ConnectedEnvironmentsClientListByResourceGroupOptions) *runtime.Pager[ConnectedEnvironmentsClientListByResourceGroupResponse]` +- New function `*ConnectedEnvironmentsClient.NewListBySubscriptionPager(*ConnectedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ConnectedEnvironmentsClientListBySubscriptionResponse]` +- New function `*ConnectedEnvironmentsClient.Update(context.Context, string, string, *ConnectedEnvironmentsClientUpdateOptions) (ConnectedEnvironmentsClientUpdateResponse, error)` +- New function `NewConnectedEnvironmentsDaprComponentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectedEnvironmentsDaprComponentsClient, error)` +- New function `*ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate(context.Context, string, string, string, DaprComponent, *ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions) (ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse, error)` +- New function `*ConnectedEnvironmentsDaprComponentsClient.Delete(context.Context, string, string, string, *ConnectedEnvironmentsDaprComponentsClientDeleteOptions) (ConnectedEnvironmentsDaprComponentsClientDeleteResponse, error)` +- New function `*ConnectedEnvironmentsDaprComponentsClient.Get(context.Context, string, string, string, *ConnectedEnvironmentsDaprComponentsClientGetOptions) (ConnectedEnvironmentsDaprComponentsClientGetResponse, error)` +- New function `*ConnectedEnvironmentsDaprComponentsClient.NewListPager(string, string, *ConnectedEnvironmentsDaprComponentsClientListOptions) *runtime.Pager[ConnectedEnvironmentsDaprComponentsClientListResponse]` +- New function `*ConnectedEnvironmentsDaprComponentsClient.ListSecrets(context.Context, string, string, string, *ConnectedEnvironmentsDaprComponentsClientListSecretsOptions) (ConnectedEnvironmentsDaprComponentsClientListSecretsResponse, error)` +- New function `NewConnectedEnvironmentsStoragesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectedEnvironmentsStoragesClient, error)` +- New function `*ConnectedEnvironmentsStoragesClient.CreateOrUpdate(context.Context, string, string, string, ConnectedEnvironmentStorage, *ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions) (ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse, error)` +- New function `*ConnectedEnvironmentsStoragesClient.Delete(context.Context, string, string, string, *ConnectedEnvironmentsStoragesClientDeleteOptions) (ConnectedEnvironmentsStoragesClientDeleteResponse, error)` +- New function `*ConnectedEnvironmentsStoragesClient.Get(context.Context, string, string, string, *ConnectedEnvironmentsStoragesClientGetOptions) (ConnectedEnvironmentsStoragesClientGetResponse, error)` +- New function `*ConnectedEnvironmentsStoragesClient.List(context.Context, string, string, *ConnectedEnvironmentsStoragesClientListOptions) (ConnectedEnvironmentsStoragesClientListResponse, error)` +- New function `NewContainerAppsAPIClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerAppsAPIClient, error)` +- New function `*ContainerAppsAPIClient.JobExecution(context.Context, string, string, string, *ContainerAppsAPIClientJobExecutionOptions) (ContainerAppsAPIClientJobExecutionResponse, error)` +- New function `*ContainerAppsClient.GetAuthToken(context.Context, string, string, *ContainerAppsClientGetAuthTokenOptions) (ContainerAppsClientGetAuthTokenResponse, error)` +- New function `*ContainerAppsClient.BeginStart(context.Context, string, string, *ContainerAppsClientBeginStartOptions) (*runtime.Poller[ContainerAppsClientStartResponse], error)` +- New function `*ContainerAppsClient.BeginStop(context.Context, string, string, *ContainerAppsClientBeginStopOptions) (*runtime.Poller[ContainerAppsClientStopResponse], error)` +- New function `NewContainerAppsDiagnosticsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerAppsDiagnosticsClient, error)` +- New function `*ContainerAppsDiagnosticsClient.GetDetector(context.Context, string, string, string, *ContainerAppsDiagnosticsClientGetDetectorOptions) (ContainerAppsDiagnosticsClientGetDetectorResponse, error)` +- New function `*ContainerAppsDiagnosticsClient.GetRevision(context.Context, string, string, string, *ContainerAppsDiagnosticsClientGetRevisionOptions) (ContainerAppsDiagnosticsClientGetRevisionResponse, error)` +- New function `*ContainerAppsDiagnosticsClient.GetRoot(context.Context, string, string, *ContainerAppsDiagnosticsClientGetRootOptions) (ContainerAppsDiagnosticsClientGetRootResponse, error)` +- New function `*ContainerAppsDiagnosticsClient.NewListDetectorsPager(string, string, *ContainerAppsDiagnosticsClientListDetectorsOptions) *runtime.Pager[ContainerAppsDiagnosticsClientListDetectorsResponse]` +- New function `*ContainerAppsDiagnosticsClient.NewListRevisionsPager(string, string, *ContainerAppsDiagnosticsClientListRevisionsOptions) *runtime.Pager[ContainerAppsDiagnosticsClientListRevisionsResponse]` - New function `NewJobsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*JobsClient, error)` - New function `*JobsClient.BeginCreateOrUpdate(context.Context, string, string, Job, *JobsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JobsClientCreateOrUpdateResponse], error)` - New function `*JobsClient.BeginDelete(context.Context, string, string, *JobsClientBeginDeleteOptions) (*runtime.Poller[JobsClientDeleteResponse], error)` @@ -35,9 +87,9 @@ - New function `*JobsClient.NewListByResourceGroupPager(string, *JobsClientListByResourceGroupOptions) *runtime.Pager[JobsClientListByResourceGroupResponse]` - New function `*JobsClient.NewListBySubscriptionPager(*JobsClientListBySubscriptionOptions) *runtime.Pager[JobsClientListBySubscriptionResponse]` - New function `*JobsClient.ListSecrets(context.Context, string, string, *JobsClientListSecretsOptions) (JobsClientListSecretsResponse, error)` -- New function `*JobsClient.BeginStart(context.Context, string, string, JobExecutionTemplate, *JobsClientBeginStartOptions) (*runtime.Poller[JobsClientStartResponse], error)` +- New function `*JobsClient.BeginStart(context.Context, string, string, *JobsClientBeginStartOptions) (*runtime.Poller[JobsClientStartResponse], error)` - New function `*JobsClient.BeginStopExecution(context.Context, string, string, string, *JobsClientBeginStopExecutionOptions) (*runtime.Poller[JobsClientStopExecutionResponse], error)` -- New function `*JobsClient.BeginStopMultipleExecutions(context.Context, string, string, JobExecutionNamesCollection, *JobsClientBeginStopMultipleExecutionsOptions) (*runtime.Poller[JobsClientStopMultipleExecutionsResponse], error)` +- New function `*JobsClient.BeginStopMultipleExecutions(context.Context, string, string, *JobsClientBeginStopMultipleExecutionsOptions) (*runtime.Poller[JobsClientStopMultipleExecutionsResponse], error)` - New function `*JobsClient.BeginUpdate(context.Context, string, string, JobPatchProperties, *JobsClientBeginUpdateOptions) (*runtime.Poller[JobsClientUpdateResponse], error)` - New function `NewJobsExecutionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*JobsExecutionsClient, error)` - New function `*JobsExecutionsClient.NewListPager(string, string, *JobsExecutionsClientListOptions) *runtime.Pager[JobsExecutionsClientListResponse]` @@ -47,12 +99,59 @@ - New function `*ManagedCertificatesClient.Get(context.Context, string, string, string, *ManagedCertificatesClientGetOptions) (ManagedCertificatesClientGetResponse, error)` - New function `*ManagedCertificatesClient.NewListPager(string, string, *ManagedCertificatesClientListOptions) *runtime.Pager[ManagedCertificatesClientListResponse]` - New function `*ManagedCertificatesClient.Update(context.Context, string, string, string, ManagedCertificatePatch, *ManagedCertificatesClientUpdateOptions) (ManagedCertificatesClientUpdateResponse, error)` +- New function `NewManagedEnvironmentDiagnosticsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedEnvironmentDiagnosticsClient, error)` +- New function `*ManagedEnvironmentDiagnosticsClient.GetDetector(context.Context, string, string, string, *ManagedEnvironmentDiagnosticsClientGetDetectorOptions) (ManagedEnvironmentDiagnosticsClientGetDetectorResponse, error)` +- New function `*ManagedEnvironmentDiagnosticsClient.ListDetectors(context.Context, string, string, *ManagedEnvironmentDiagnosticsClientListDetectorsOptions) (ManagedEnvironmentDiagnosticsClientListDetectorsResponse, error)` +- New function `*ManagedEnvironmentsClient.GetAuthToken(context.Context, string, string, *ManagedEnvironmentsClientGetAuthTokenOptions) (ManagedEnvironmentsClientGetAuthTokenResponse, error)` +- New function `*ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager(string, string, *ManagedEnvironmentsClientListWorkloadProfileStatesOptions) *runtime.Pager[ManagedEnvironmentsClientListWorkloadProfileStatesResponse]` +- New function `NewManagedEnvironmentsDiagnosticsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedEnvironmentsDiagnosticsClient, error)` +- New function `*ManagedEnvironmentsDiagnosticsClient.GetRoot(context.Context, string, string, *ManagedEnvironmentsDiagnosticsClientGetRootOptions) (ManagedEnvironmentsDiagnosticsClientGetRootResponse, error)` +- New struct `AvailableWorkloadProfile` +- New struct `AvailableWorkloadProfileProperties` +- New struct `AvailableWorkloadProfilesCollection` +- New struct `BaseContainer` +- New struct `BillingMeter` +- New struct `BillingMeterCollection` +- New struct `BillingMeterProperties` +- New struct `ConnectedEnvironment` +- New struct `ConnectedEnvironmentCollection` +- New struct `ConnectedEnvironmentProperties` +- New struct `ConnectedEnvironmentStorage` +- New struct `ConnectedEnvironmentStorageProperties` +- New struct `ConnectedEnvironmentStoragesCollection` +- New struct `ContainerAppAuthToken` +- New struct `ContainerAppAuthTokenProperties` - New struct `ContainerAppJobExecutions` - New struct `CorsPolicy` +- New struct `CustomDomainConfiguration` +- New struct `CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo` +- New struct `CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem` - New struct `DaprConfiguration` +- New struct `DaprSecret` +- New struct `DiagnosticDataProviderMetadata` +- New struct `DiagnosticDataProviderMetadataPropertyBagItem` +- New struct `DiagnosticDataTableResponseColumn` +- New struct `DiagnosticDataTableResponseObject` +- New struct `DiagnosticRendering` +- New struct `DiagnosticSupportTopic` +- New struct `Diagnostics` +- New struct `DiagnosticsCollection` +- New struct `DiagnosticsDataAPIResponse` +- New struct `DiagnosticsDefinition` +- New struct `DiagnosticsProperties` +- New struct `DiagnosticsStatus` +- New struct `EnvironmentAuthToken` +- New struct `EnvironmentAuthTokenProperties` +- New struct `ErrorAdditionalInfo` +- New struct `ErrorDetail` +- New struct `ErrorResponse` +- New struct `ExtendedLocation` +- New struct `IPSecurityRestrictionRule` - New struct `IngressStickySessions` +- New struct `InitContainer` - New struct `Job` - New struct `JobConfiguration` +- New struct `JobConfigurationEventTriggerConfig` - New struct `JobConfigurationManualTriggerConfig` - New struct `JobConfigurationScheduleTriggerConfig` - New struct `JobExecution` @@ -63,6 +162,8 @@ - New struct `JobPatchProperties` - New struct `JobPatchPropertiesProperties` - New struct `JobProperties` +- New struct `JobScale` +- New struct `JobScaleRule` - New struct `JobSecretsCollection` - New struct `JobTemplate` - New struct `JobsCollection` @@ -71,19 +172,39 @@ - New struct `ManagedCertificateCollection` - New struct `ManagedCertificatePatch` - New struct `ManagedCertificateProperties` +- New struct `ManagedEnvironmentPropertiesPeerAuthentication` +- New struct `Mtls` - New struct `SecretVolumeItem` -- New field `Category` in struct `AvailableWorkloadProfileProperties` -- New field `ManagedBy` in struct `ContainerApp` -- New field `LatestReadyRevisionName`, `WorkloadProfileName` in struct `ContainerAppProperties` +- New struct `Service` +- New struct `ServiceBind` +- New struct `TCPScaleRule` +- New struct `WorkloadProfile` +- New struct `WorkloadProfileStates` +- New struct `WorkloadProfileStatesCollection` +- New struct `WorkloadProfileStatesProperties` +- New field `Kind` in struct `AzureCredentials` +- New field `SubjectAlternativeNames` in struct `CertificateProperties` +- New field `MaxInactiveRevisions`, `Service` in struct `Configuration` +- New field `ExtendedLocation`, `ManagedBy` in struct `ContainerApp` +- New field `EnvironmentID`, `EventStreamEndpoint`, `LatestReadyRevisionName`, `WorkloadProfileName` in struct `ContainerAppProperties` - New field `Identity`, `KeyVaultURL` in struct `ContainerAppSecret` - New anonymous field `ContainerApp` in struct `ContainerAppsClientUpdateResponse` -- New field `ClientCertificateMode`, `CorsPolicy`, `StickySessions` in struct `Ingress` +- New field `ARecords`, `AlternateCNameRecords`, `AlternateTxtRecords`, `CNameRecords`, `ConflictWithEnvironmentCustomDomain`, `ConflictingContainerAppResourceID`, `CustomDomainVerificationFailureInfo`, `CustomDomainVerificationTest`, `HasConflictOnManagedEnvironment`, `HostName`, `IsHostnameAlreadyVerified`, `TxtRecords` in struct `CustomHostnameAnalysisResult` +- New field `EnableAPILogging`, `HTTPMaxRequestSize`, `HTTPReadBufferSize`, `LogLevel` in struct `Dapr` +- New field `SecretStoreComponent` in struct `DaprComponentProperties` +- New field `GithubPersonalAccessToken` in struct `GithubActionConfiguration` +- New field `ClientCertificateMode`, `CorsPolicy`, `ExposedPort`, `IPSecurityRestrictions`, `StickySessions` in struct `Ingress` - New field `Kind` in struct `ManagedEnvironment` -- New field `DaprConfiguration`, `InfrastructureResourceGroup`, `KedaConfiguration` in struct `ManagedEnvironmentProperties` +- New field `CustomDomainConfiguration`, `DaprConfiguration`, `EventStreamEndpoint`, `InfrastructureResourceGroup`, `KedaConfiguration`, `PeerAuthentication`, `WorkloadProfiles` in struct `ManagedEnvironmentProperties` - New anonymous field `ManagedEnvironment` in struct `ManagedEnvironmentsClientUpdateResponse` +- New field `ExecEndpoint`, `LogStreamEndpoint`, `RunningState`, `RunningStateDetails` in struct `ReplicaContainer` +- New field `InitContainers`, `RunningState`, `RunningStateDetails` in struct `ReplicaProperties` +- New field `LastActiveTime`, `RunningState` in struct `RevisionProperties` +- New field `TCP` in struct `ScaleRule` - New field `Identity`, `KeyVaultURL` in struct `Secret` -- New field `Secrets` in struct `Volume` -- New field `Name` in struct `WorkloadProfile` +- New field `InitContainers`, `ServiceBinds`, `TerminationGracePeriodSeconds` in struct `Template` +- New field `MountOptions`, `Secrets` in struct `Volume` +- New field `SubPath` in struct `VolumeMount` ## 1.1.0 (2023-04-07) diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/autorest.md b/sdk/resourcemanager/appcontainers/armappcontainers/autorest.md index c8092ed50e49..0e4d4ca79ac3 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/autorest.md +++ b/sdk/resourcemanager/appcontainers/armappcontainers/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0-beta.3 -tag: package-preview-2022-11 +module-version: 2.0.0 +tag: package-2023-05 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client.go index b790d2a784c3..1f22caf0a2b5 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -46,7 +45,7 @@ func NewAvailableWorkloadProfilesClient(subscriptionID string, credential azcore // NewGetPager - Get all available workload profiles for a location. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - location - The name of Azure region. // - options - AvailableWorkloadProfilesClientGetOptions contains the optional parameters for the AvailableWorkloadProfilesClient.NewGetPager // method. @@ -94,7 +93,7 @@ func (client *AvailableWorkloadProfilesClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client_example_test.go index 8923fbaf6b8b..c69ec8ca83df 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/availableworkloadprofiles_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AvailableWorkloadProfiles_Get.json func ExampleAvailableWorkloadProfilesClient_NewGetPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client.go index a1f7c9be4a31..59acf5dad8bb 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,22 +46,25 @@ func NewBillingMetersClient(subscriptionID string, credential azcore.TokenCreden // Get - Get all billingMeters for a location. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - location - The name of Azure region. // - options - BillingMetersClientGetOptions contains the optional parameters for the BillingMetersClient.Get method. func (client *BillingMetersClient) Get(ctx context.Context, location string, options *BillingMetersClientGetOptions) (BillingMetersClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, location, options) if err != nil { return BillingMetersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BillingMetersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BillingMetersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BillingMetersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -81,7 +83,7 @@ func (client *BillingMetersClient) getCreateRequest(ctx context.Context, locatio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client_example_test.go index 28391eb2b4a1..bdee7ba5632f 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/billingmeters_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/BillingMeters_Get.json func ExampleBillingMetersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client.go index d6bd00f1744b..5fb293b42374 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,25 +46,28 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or Update a Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. // - options - CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate // method. func (client *CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, options *CertificatesClientCreateOrUpdateOptions) (CertificatesClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, environmentName, certificateName, options) if err != nil { return CertificatesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -92,11 +94,14 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.CertificateEnvelope != nil { - return req, runtime.MarshalAsJSON(req, *options.CertificateEnvelope) + if err := runtime.MarshalAsJSON(req, *options.CertificateEnvelope); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -113,22 +118,24 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. // - options - CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, options *CertificatesClientDeleteOptions) (CertificatesClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, environmentName, certificateName, options) if err != nil { return CertificatesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientDeleteResponse{}, err } return CertificatesClientDeleteResponse{}, nil } @@ -157,7 +164,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,24 +173,27 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Get the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. // - options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, environmentName, certificateName, options) if err != nil { return CertificatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -210,7 +220,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,7 +237,7 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif // NewListPager - Get the Certificates in a given managed environment. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. @@ -279,7 +289,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,25 +307,28 @@ func (client *CertificatesClient) listHandleResponse(resp *http.Response) (Certi // Update - Patches a certificate. Currently only patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. // - certificateEnvelope - Properties of a certificate that need to be updated // - options - CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. func (client *CertificatesClient) Update(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, certificateEnvelope CertificatePatch, options *CertificatesClientUpdateOptions) (CertificatesClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, environmentName, certificateName, certificateEnvelope, options) if err != nil { return CertificatesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -342,10 +355,13 @@ func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateEnvelope) + if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client_example_test.go index 3fcbf2d0ddab..de3199f1cf53 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/certificates_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_ListByManagedEnvironment.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_ListByManagedEnvironment.json func ExampleCertificatesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExampleCertificatesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Get.json func ExampleCertificatesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -117,7 +117,7 @@ func ExampleCertificatesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_CreateOrUpdate.json func ExampleCertificatesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -160,7 +160,7 @@ func ExampleCertificatesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Delete.json func ExampleCertificatesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -177,7 +177,7 @@ func ExampleCertificatesClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_Patch.json func ExampleCertificatesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/client_factory.go b/sdk/resourcemanager/appcontainers/armappcontainers/client_factory.go index a1c8d05e3f36..b983ccb507a7 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/client_factory.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/client_factory.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -38,11 +37,6 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewContainerAppsAuthConfigsClient() *ContainerAppsAuthConfigsClient { - subClient, _ := NewContainerAppsAuthConfigsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewAvailableWorkloadProfilesClient() *AvailableWorkloadProfilesClient { subClient, _ := NewAvailableWorkloadProfilesClient(c.subscriptionID, c.credential, c.options) return subClient @@ -53,8 +47,8 @@ func (c *ClientFactory) NewBillingMetersClient() *BillingMetersClient { return subClient } -func (c *ClientFactory) NewConnectedEnvironmentsClient() *ConnectedEnvironmentsClient { - subClient, _ := NewConnectedEnvironmentsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { + subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -63,6 +57,11 @@ func (c *ClientFactory) NewConnectedEnvironmentsCertificatesClient() *ConnectedE return subClient } +func (c *ClientFactory) NewConnectedEnvironmentsClient() *ConnectedEnvironmentsClient { + subClient, _ := NewConnectedEnvironmentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewConnectedEnvironmentsDaprComponentsClient() *ConnectedEnvironmentsDaprComponentsClient { subClient, _ := NewConnectedEnvironmentsDaprComponentsClient(c.subscriptionID, c.credential, c.options) return subClient @@ -73,23 +72,23 @@ func (c *ClientFactory) NewConnectedEnvironmentsStoragesClient() *ConnectedEnvir return subClient } -func (c *ClientFactory) NewContainerAppsClient() *ContainerAppsClient { - subClient, _ := NewContainerAppsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewContainerAppsAPIClient() *ContainerAppsAPIClient { + subClient, _ := NewContainerAppsAPIClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobsClient() *JobsClient { - subClient, _ := NewJobsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewContainerAppsAuthConfigsClient() *ContainerAppsAuthConfigsClient { + subClient, _ := NewContainerAppsAuthConfigsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobsExecutionsClient() *JobsExecutionsClient { - subClient, _ := NewJobsExecutionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewContainerAppsClient() *ContainerAppsClient { + subClient, _ := NewContainerAppsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewContainerAppsRevisionsClient() *ContainerAppsRevisionsClient { - subClient, _ := NewContainerAppsRevisionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewContainerAppsDiagnosticsClient() *ContainerAppsDiagnosticsClient { + subClient, _ := NewContainerAppsDiagnosticsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -98,48 +97,48 @@ func (c *ClientFactory) NewContainerAppsRevisionReplicasClient() *ContainerAppsR return subClient } -func (c *ClientFactory) NewContainerAppsDiagnosticsClient() *ContainerAppsDiagnosticsClient { - subClient, _ := NewContainerAppsDiagnosticsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewContainerAppsRevisionsClient() *ContainerAppsRevisionsClient { + subClient, _ := NewContainerAppsRevisionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewManagedEnvironmentDiagnosticsClient() *ManagedEnvironmentDiagnosticsClient { - subClient, _ := NewManagedEnvironmentDiagnosticsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewContainerAppsSourceControlsClient() *ContainerAppsSourceControlsClient { + subClient, _ := NewContainerAppsSourceControlsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewManagedEnvironmentsDiagnosticsClient() *ManagedEnvironmentsDiagnosticsClient { - subClient, _ := NewManagedEnvironmentsDiagnosticsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDaprComponentsClient() *DaprComponentsClient { + subClient, _ := NewDaprComponentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewJobsClient() *JobsClient { + subClient, _ := NewJobsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewManagedEnvironmentsClient() *ManagedEnvironmentsClient { - subClient, _ := NewManagedEnvironmentsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewJobsExecutionsClient() *JobsExecutionsClient { + subClient, _ := NewJobsExecutionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { - subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagedCertificatesClient() *ManagedCertificatesClient { + subClient, _ := NewManagedCertificatesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewManagedCertificatesClient() *ManagedCertificatesClient { - subClient, _ := NewManagedCertificatesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagedEnvironmentDiagnosticsClient() *ManagedEnvironmentDiagnosticsClient { + subClient, _ := NewManagedEnvironmentDiagnosticsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewNamespacesClient() *NamespacesClient { - subClient, _ := NewNamespacesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagedEnvironmentsClient() *ManagedEnvironmentsClient { + subClient, _ := NewManagedEnvironmentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDaprComponentsClient() *DaprComponentsClient { - subClient, _ := NewDaprComponentsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagedEnvironmentsDiagnosticsClient() *ManagedEnvironmentsDiagnosticsClient { + subClient, _ := NewManagedEnvironmentsDiagnosticsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -148,7 +147,12 @@ func (c *ClientFactory) NewManagedEnvironmentsStoragesClient() *ManagedEnvironme return subClient } -func (c *ClientFactory) NewContainerAppsSourceControlsClient() *ContainerAppsSourceControlsClient { - subClient, _ := NewContainerAppsSourceControlsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewNamespacesClient() *NamespacesClient { + subClient, _ := NewNamespacesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client.go index 504d0e783729..0a64ebf5ce83 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,25 +46,28 @@ func NewConnectedEnvironmentsClient(subscriptionID string, credential azcore.Tok // CheckNameAvailability - Checks if resource connectedEnvironmentName is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Managed Environment. // - checkNameAvailabilityRequest - The check connectedEnvironmentName availability request. // - options - ConnectedEnvironmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ConnectedEnvironmentsClient.CheckNameAvailability // method. func (client *ConnectedEnvironmentsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *ConnectedEnvironmentsClientCheckNameAvailabilityOptions) (ConnectedEnvironmentsClientCheckNameAvailabilityResponse, error) { + var err error req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, options) if err != nil { return ConnectedEnvironmentsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -88,10 +90,13 @@ func (client *ConnectedEnvironmentsClient) checkNameAvailabilityCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkNameAvailabilityRequest) + if err := runtime.MarshalAsJSON(req, checkNameAvailabilityRequest); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -106,7 +111,7 @@ func (client *ConnectedEnvironmentsClient) checkNameAvailabilityHandleResponse(r // BeginCreateOrUpdate - Creates or updates an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - environmentEnvelope - Configuration details of the connectedEnvironment. @@ -118,9 +123,10 @@ func (client *ConnectedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Conte if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectedEnvironmentsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectedEnvironmentsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[ConnectedEnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -129,20 +135,22 @@ func (client *ConnectedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Creates or updates an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ConnectedEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, environmentEnvelope ConnectedEnvironment, options *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, environmentEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -165,16 +173,19 @@ func (client *ConnectedEnvironmentsClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, environmentEnvelope) + if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginDelete @@ -185,9 +196,10 @@ func (client *ConnectedEnvironmentsClient) BeginDelete(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectedEnvironmentsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectedEnvironmentsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[ConnectedEnvironmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -196,20 +208,22 @@ func (client *ConnectedEnvironmentsClient) BeginDelete(ctx context.Context, reso // Delete - Delete an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ConnectedEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -232,7 +246,7 @@ func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,24 +255,27 @@ func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Conte // Get - Get the properties of an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsClient.Get // method. func (client *ConnectedEnvironmentsClient) Get(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientGetOptions) (ConnectedEnvironmentsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) if err != nil { return ConnectedEnvironmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -281,7 +298,7 @@ func (client *ConnectedEnvironmentsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,7 +315,7 @@ func (client *ConnectedEnvironmentsClient) getHandleResponse(resp *http.Response // NewListByResourceGroupPager - Get all connectedEnvironments in a resource group. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ConnectedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListByResourceGroupPager // method. @@ -346,7 +363,7 @@ func (client *ConnectedEnvironmentsClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -363,7 +380,7 @@ func (client *ConnectedEnvironmentsClient) listByResourceGroupHandleResponse(res // NewListBySubscriptionPager - Get all connectedEnvironments for a subscription. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - options - ConnectedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListBySubscriptionPager // method. func (client *ConnectedEnvironmentsClient) NewListBySubscriptionPager(options *ConnectedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ConnectedEnvironmentsClientListBySubscriptionResponse] { @@ -406,7 +423,7 @@ func (client *ConnectedEnvironmentsClient) listBySubscriptionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -424,24 +441,27 @@ func (client *ConnectedEnvironmentsClient) listBySubscriptionHandleResponse(resp // Update - Patches a Managed Environment. Only patching of tags is supported currently // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.Update // method. func (client *ConnectedEnvironmentsClient) Update(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientUpdateOptions) (ConnectedEnvironmentsClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) if err != nil { return ConnectedEnvironmentsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -464,7 +484,7 @@ func (client *ConnectedEnvironmentsClient) updateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client_example_test.go index 9f11704bfb59..56ca8025848b 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironments_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListBySubscription.json func ExampleConnectedEnvironmentsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -86,7 +86,7 @@ func ExampleConnectedEnvironmentsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListByResourceGroup.json func ExampleConnectedEnvironmentsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -162,7 +162,7 @@ func ExampleConnectedEnvironmentsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Get.json func ExampleConnectedEnvironmentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -206,7 +206,7 @@ func ExampleConnectedEnvironmentsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_CreateOrUpdate.json func ExampleConnectedEnvironmentsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -265,7 +265,7 @@ func ExampleConnectedEnvironmentsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Delete.json func ExampleConnectedEnvironmentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -286,7 +286,7 @@ func ExampleConnectedEnvironmentsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Patch.json func ExampleConnectedEnvironmentsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -328,7 +328,7 @@ func ExampleConnectedEnvironmentsClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json func ExampleConnectedEnvironmentsClient_CheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client.go index be401cfd9bd8..a92142a05577 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,25 +46,28 @@ func NewConnectedEnvironmentsCertificatesClient(subscriptionID string, credentia // CreateOrUpdate - Create or Update a Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. // - options - ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.CreateOrUpdate // method. func (client *ConnectedEnvironmentsCertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions) (ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, certificateName, options) if err != nil { return ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -92,11 +94,14 @@ func (client *ConnectedEnvironmentsCertificatesClient) createOrUpdateCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.CertificateEnvelope != nil { - return req, runtime.MarshalAsJSON(req, *options.CertificateEnvelope) + if err := runtime.MarshalAsJSON(req, *options.CertificateEnvelope); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -113,23 +118,25 @@ func (client *ConnectedEnvironmentsCertificatesClient) createOrUpdateHandleRespo // Delete - Deletes the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. // - options - ConnectedEnvironmentsCertificatesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Delete // method. func (client *ConnectedEnvironmentsCertificatesClient) Delete(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientDeleteOptions) (ConnectedEnvironmentsCertificatesClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, certificateName, options) if err != nil { return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, err } return ConnectedEnvironmentsCertificatesClientDeleteResponse{}, nil } @@ -158,7 +165,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -167,25 +174,28 @@ func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx c // Get - Get the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. // - options - ConnectedEnvironmentsCertificatesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Get // method. func (client *ConnectedEnvironmentsCertificatesClient) Get(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientGetOptions) (ConnectedEnvironmentsCertificatesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, certificateName, options) if err != nil { return ConnectedEnvironmentsCertificatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsCertificatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsCertificatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsCertificatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -212,7 +222,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -229,7 +239,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) getHandleResponse(resp *h // NewListPager - Get the Certificates in a given connected environment. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - options - ConnectedEnvironmentsCertificatesClientListOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.NewListPager @@ -282,7 +292,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) listCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -300,7 +310,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) listHandleResponse(resp * // Update - Patches a certificate. Currently only patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -308,18 +318,21 @@ func (client *ConnectedEnvironmentsCertificatesClient) listHandleResponse(resp * // - options - ConnectedEnvironmentsCertificatesClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Update // method. func (client *ConnectedEnvironmentsCertificatesClient) Update(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, certificateEnvelope CertificatePatch, options *ConnectedEnvironmentsCertificatesClientUpdateOptions) (ConnectedEnvironmentsCertificatesClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, options) if err != nil { return ConnectedEnvironmentsCertificatesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsCertificatesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsCertificatesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsCertificatesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -346,10 +359,13 @@ func (client *ConnectedEnvironmentsCertificatesClient) updateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateEnvelope) + if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client_example_test.go index 89386f024514..7e920b145855 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentscertificates_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json func ExampleConnectedEnvironmentsCertificatesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -80,7 +80,7 @@ func ExampleConnectedEnvironmentsCertificatesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Get.json func ExampleConnectedEnvironmentsCertificatesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -117,7 +117,7 @@ func ExampleConnectedEnvironmentsCertificatesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json func ExampleConnectedEnvironmentsCertificatesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -160,7 +160,7 @@ func ExampleConnectedEnvironmentsCertificatesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Delete.json func ExampleConnectedEnvironmentsCertificatesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -177,7 +177,7 @@ func ExampleConnectedEnvironmentsCertificatesClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_Patch.json func ExampleConnectedEnvironmentsCertificatesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client.go index 51216072f01c..1828929c6e51 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewConnectedEnvironmentsDaprComponentsClient(subscriptionID string, credent // CreateOrUpdate - Creates or updates a Dapr Component in a connected environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -55,18 +54,21 @@ func NewConnectedEnvironmentsDaprComponentsClient(subscriptionID string, credent // - options - ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate // method. func (client *ConnectedEnvironmentsDaprComponentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, daprComponentEnvelope DaprComponent, options *ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions) (ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, options) if err != nil { return ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,10 +95,13 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, daprComponentEnvelope) + if err := runtime.MarshalAsJSON(req, daprComponentEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,23 +116,25 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateHandleRes // Delete - Delete a Dapr Component from a connected environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. // - options - ConnectedEnvironmentsDaprComponentsClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Delete // method. func (client *ConnectedEnvironmentsDaprComponentsClient) Delete(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientDeleteOptions) (ConnectedEnvironmentsDaprComponentsClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, componentName, options) if err != nil { return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, err } return ConnectedEnvironmentsDaprComponentsClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,25 +172,28 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx // Get - Get a dapr component. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. // - options - ConnectedEnvironmentsDaprComponentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Get // method. func (client *ConnectedEnvironmentsDaprComponentsClient) Get(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientGetOptions) (ConnectedEnvironmentsDaprComponentsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, componentName, options) if err != nil { return ConnectedEnvironmentsDaprComponentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsDaprComponentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsDaprComponentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsDaprComponentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -210,7 +220,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,7 +237,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) getHandleResponse(resp // NewListPager - Get the Dapr Components for a connected environment. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - options - ConnectedEnvironmentsDaprComponentsClientListOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.NewListPager @@ -280,7 +290,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,25 +308,28 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listHandleResponse(resp // ListSecrets - List secrets for a dapr component // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. // - options - ConnectedEnvironmentsDaprComponentsClientListSecretsOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.ListSecrets // method. func (client *ConnectedEnvironmentsDaprComponentsClient) ListSecrets(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientListSecretsOptions) (ConnectedEnvironmentsDaprComponentsClientListSecretsResponse, error) { + var err error req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, componentName, options) if err != nil { return ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsDaprComponentsClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. @@ -343,7 +356,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listSecretsCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client_example_test.go index a973564ed261..06225194b03b 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsdaprcomponents_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_List.json func ExampleConnectedEnvironmentsDaprComponentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleConnectedEnvironmentsDaprComponentsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Get.json func ExampleConnectedEnvironmentsDaprComponentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -136,7 +136,7 @@ func ExampleConnectedEnvironmentsDaprComponentsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json func ExampleConnectedEnvironmentsDaprComponentsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -223,7 +223,7 @@ func ExampleConnectedEnvironmentsDaprComponentsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json func ExampleConnectedEnvironmentsDaprComponentsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -240,7 +240,7 @@ func ExampleConnectedEnvironmentsDaprComponentsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json func ExampleConnectedEnvironmentsDaprComponentsClient_ListSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client.go index 0b8e7a561869..844427ef6deb 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewConnectedEnvironmentsStoragesClient(subscriptionID string, credential az // CreateOrUpdate - Create or update storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. @@ -55,18 +54,21 @@ func NewConnectedEnvironmentsStoragesClient(subscriptionID string, credential az // - options - ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.CreateOrUpdate // method. func (client *ConnectedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, storageEnvelope ConnectedEnvironmentStorage, options *ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions) (ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, options) if err != nil { return ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,10 +95,13 @@ func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, storageEnvelope) + if err := runtime.MarshalAsJSON(req, storageEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,23 +116,25 @@ func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateHandleResponse( // Delete - Delete storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. // - options - ConnectedEnvironmentsStoragesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Delete // method. func (client *ConnectedEnvironmentsStoragesClient) Delete(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, options *ConnectedEnvironmentsStoragesClientDeleteOptions) (ConnectedEnvironmentsStoragesClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, storageName, options) if err != nil { return ConnectedEnvironmentsStoragesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsStoragesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectedEnvironmentsStoragesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsStoragesClientDeleteResponse{}, err } return ConnectedEnvironmentsStoragesClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,25 +172,28 @@ func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx conte // Get - Get storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. // - options - ConnectedEnvironmentsStoragesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Get // method. func (client *ConnectedEnvironmentsStoragesClient) Get(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, options *ConnectedEnvironmentsStoragesClientGetOptions) (ConnectedEnvironmentsStoragesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, storageName, options) if err != nil { return ConnectedEnvironmentsStoragesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsStoragesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsStoragesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsStoragesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -210,7 +220,7 @@ func (client *ConnectedEnvironmentsStoragesClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,24 +238,27 @@ func (client *ConnectedEnvironmentsStoragesClient) getHandleResponse(resp *http. // List - Get all storages for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - options - ConnectedEnvironmentsStoragesClientListOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.List // method. func (client *ConnectedEnvironmentsStoragesClient) List(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsStoragesClientListOptions) (ConnectedEnvironmentsStoragesClientListResponse, error) { + var err error req, err := client.listCreateRequest(ctx, resourceGroupName, connectedEnvironmentName, options) if err != nil { return ConnectedEnvironmentsStoragesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectedEnvironmentsStoragesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectedEnvironmentsStoragesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectedEnvironmentsStoragesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -268,7 +281,7 @@ func (client *ConnectedEnvironmentsStoragesClient) listCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client_example_test.go index 66210a9be7b2..436a0131623e 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/connectedenvironmentsstorages_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_List.json func ExampleConnectedEnvironmentsStoragesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -53,7 +53,7 @@ func ExampleConnectedEnvironmentsStoragesClient_List() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Get.json func ExampleConnectedEnvironmentsStoragesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -85,7 +85,7 @@ func ExampleConnectedEnvironmentsStoragesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json func ExampleConnectedEnvironmentsStoragesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,7 +126,7 @@ func ExampleConnectedEnvironmentsStoragesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Delete.json func ExampleConnectedEnvironmentsStoragesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/constants.go b/sdk/resourcemanager/appcontainers/armappcontainers/constants.go index b2d81edaaf99..b53989435272 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/constants.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/constants.go @@ -3,15 +3,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers const ( moduleName = "armappcontainers" - moduleVersion = "v2.0.0-beta.3" + moduleVersion = "v2.0.0" ) // AccessMode - Access mode for storage @@ -194,6 +193,24 @@ func PossibleConnectedEnvironmentProvisioningStateValues() []ConnectedEnvironmen } } +// ContainerAppContainerRunningState - Current running state of the container +type ContainerAppContainerRunningState string + +const ( + ContainerAppContainerRunningStateRunning ContainerAppContainerRunningState = "Running" + ContainerAppContainerRunningStateTerminated ContainerAppContainerRunningState = "Terminated" + ContainerAppContainerRunningStateWaiting ContainerAppContainerRunningState = "Waiting" +) + +// PossibleContainerAppContainerRunningStateValues returns the possible values for the ContainerAppContainerRunningState const type. +func PossibleContainerAppContainerRunningStateValues() []ContainerAppContainerRunningState { + return []ContainerAppContainerRunningState{ + ContainerAppContainerRunningStateRunning, + ContainerAppContainerRunningStateTerminated, + ContainerAppContainerRunningStateWaiting, + } +} + // ContainerAppProvisioningState - Provisioning state of the Container App. type ContainerAppProvisioningState string @@ -216,6 +233,24 @@ func PossibleContainerAppProvisioningStateValues() []ContainerAppProvisioningSta } } +// ContainerAppReplicaRunningState - Current running state of the replica +type ContainerAppReplicaRunningState string + +const ( + ContainerAppReplicaRunningStateNotRunning ContainerAppReplicaRunningState = "NotRunning" + ContainerAppReplicaRunningStateRunning ContainerAppReplicaRunningState = "Running" + ContainerAppReplicaRunningStateUnknown ContainerAppReplicaRunningState = "Unknown" +) + +// PossibleContainerAppReplicaRunningStateValues returns the possible values for the ContainerAppReplicaRunningState const type. +func PossibleContainerAppReplicaRunningStateValues() []ContainerAppReplicaRunningState { + return []ContainerAppReplicaRunningState{ + ContainerAppReplicaRunningStateNotRunning, + ContainerAppReplicaRunningStateRunning, + ContainerAppReplicaRunningStateUnknown, + } +} + // CookieExpirationConvention - The convention used when determining the session cookie's expiration. type CookieExpirationConvention string @@ -256,16 +291,16 @@ func PossibleCreatedByTypeValues() []CreatedByType { type DNSVerificationTestResult string const ( - DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" DNSVerificationTestResultFailed DNSVerificationTestResult = "Failed" + DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" DNSVerificationTestResultSkipped DNSVerificationTestResult = "Skipped" ) // PossibleDNSVerificationTestResultValues returns the possible values for the DNSVerificationTestResult const type. func PossibleDNSVerificationTestResultValues() []DNSVerificationTestResult { return []DNSVerificationTestResult{ - DNSVerificationTestResultPassed, DNSVerificationTestResultFailed, + DNSVerificationTestResultPassed, DNSVerificationTestResultSkipped, } } @@ -320,17 +355,17 @@ func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { type ForwardProxyConvention string const ( + ForwardProxyConventionCustom ForwardProxyConvention = "Custom" ForwardProxyConventionNoProxy ForwardProxyConvention = "NoProxy" ForwardProxyConventionStandard ForwardProxyConvention = "Standard" - ForwardProxyConventionCustom ForwardProxyConvention = "Custom" ) // PossibleForwardProxyConventionValues returns the possible values for the ForwardProxyConvention const type. func PossibleForwardProxyConventionValues() []ForwardProxyConvention { return []ForwardProxyConvention{ + ForwardProxyConventionCustom, ForwardProxyConventionNoProxy, ForwardProxyConventionStandard, - ForwardProxyConventionCustom, } } @@ -520,6 +555,30 @@ func PossibleRevisionProvisioningStateValues() []RevisionProvisioningState { } } +// RevisionRunningState - Current running state of the revision +type RevisionRunningState string + +const ( + RevisionRunningStateDegraded RevisionRunningState = "Degraded" + RevisionRunningStateFailed RevisionRunningState = "Failed" + RevisionRunningStateProcessing RevisionRunningState = "Processing" + RevisionRunningStateRunning RevisionRunningState = "Running" + RevisionRunningStateStopped RevisionRunningState = "Stopped" + RevisionRunningStateUnknown RevisionRunningState = "Unknown" +) + +// PossibleRevisionRunningStateValues returns the possible values for the RevisionRunningState const type. +func PossibleRevisionRunningStateValues() []RevisionRunningState { + return []RevisionRunningState{ + RevisionRunningStateDegraded, + RevisionRunningStateFailed, + RevisionRunningStateProcessing, + RevisionRunningStateRunning, + RevisionRunningStateStopped, + RevisionRunningStateUnknown, + } +} + // Scheme - Scheme to use for connecting to the host. Defaults to HTTP. type Scheme string @@ -578,9 +637,9 @@ func PossibleStorageTypeValues() []StorageType { type TriggerType string const ( - TriggerTypeEvent TriggerType = "Event" - TriggerTypeManual TriggerType = "Manual" - TriggerTypeScheduled TriggerType = "Scheduled" + TriggerTypeEvent TriggerType = "Event" + TriggerTypeManual TriggerType = "Manual" + TriggerTypeSchedule TriggerType = "Schedule" ) // PossibleTriggerTypeValues returns the possible values for the TriggerType const type. @@ -588,7 +647,7 @@ func PossibleTriggerTypeValues() []TriggerType { return []TriggerType{ TriggerTypeEvent, TriggerTypeManual, - TriggerTypeScheduled, + TriggerTypeSchedule, } } @@ -614,8 +673,8 @@ func PossibleTypeValues() []Type { type UnauthenticatedClientActionV2 string const ( - UnauthenticatedClientActionV2RedirectToLoginPage UnauthenticatedClientActionV2 = "RedirectToLoginPage" UnauthenticatedClientActionV2AllowAnonymous UnauthenticatedClientActionV2 = "AllowAnonymous" + UnauthenticatedClientActionV2RedirectToLoginPage UnauthenticatedClientActionV2 = "RedirectToLoginPage" UnauthenticatedClientActionV2Return401 UnauthenticatedClientActionV2 = "Return401" UnauthenticatedClientActionV2Return403 UnauthenticatedClientActionV2 = "Return403" ) @@ -623,8 +682,8 @@ const ( // PossibleUnauthenticatedClientActionV2Values returns the possible values for the UnauthenticatedClientActionV2 const type. func PossibleUnauthenticatedClientActionV2Values() []UnauthenticatedClientActionV2 { return []UnauthenticatedClientActionV2{ - UnauthenticatedClientActionV2RedirectToLoginPage, UnauthenticatedClientActionV2AllowAnonymous, + UnauthenticatedClientActionV2RedirectToLoginPage, UnauthenticatedClientActionV2Return401, UnauthenticatedClientActionV2Return403, } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client.go index e2387001b917..fee425e87908 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - containerAppEnvelope - Properties used to create a container app @@ -59,9 +58,10 @@ func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[ContainerAppsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -70,20 +70,22 @@ func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, containerAppName, containerAppEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -106,16 +108,19 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, containerAppEnvelope) + if err := runtime.MarshalAsJSON(req, containerAppEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete @@ -126,9 +131,10 @@ func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[ContainerAppsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -137,20 +143,22 @@ func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, containerAppName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -173,7 +181,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,23 +190,26 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. func (client *ContainerAppsClient) Get(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientGetOptions) (ContainerAppsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, containerAppName, options) if err != nil { return ContainerAppsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -221,7 +232,7 @@ func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -239,24 +250,27 @@ func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (Conta // GetAuthToken - Get auth token for a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientGetAuthTokenOptions contains the optional parameters for the ContainerAppsClient.GetAuthToken // method. func (client *ContainerAppsClient) GetAuthToken(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientGetAuthTokenOptions) (ContainerAppsClientGetAuthTokenResponse, error) { + var err error req, err := client.getAuthTokenCreateRequest(ctx, resourceGroupName, containerAppName, options) if err != nil { return ContainerAppsClientGetAuthTokenResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsClientGetAuthTokenResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientGetAuthTokenResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsClientGetAuthTokenResponse{}, err } - return client.getAuthTokenHandleResponse(resp) + resp, err := client.getAuthTokenHandleResponse(httpResp) + return resp, err } // getAuthTokenCreateRequest creates the GetAuthToken request. @@ -279,7 +293,7 @@ func (client *ContainerAppsClient) getAuthTokenCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,7 +310,7 @@ func (client *ContainerAppsClient) getAuthTokenHandleResponse(resp *http.Respons // NewListByResourceGroupPager - Get the Container Apps in a given resource group. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager // method. @@ -344,7 +358,7 @@ func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -361,7 +375,7 @@ func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http. // NewListBySubscriptionPager - Get the Container Apps in a given subscription. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager // method. func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { @@ -404,7 +418,7 @@ func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -422,24 +436,27 @@ func (client *ContainerAppsClient) listBySubscriptionHandleResponse(resp *http.R // ListCustomHostNameAnalysis - Analyzes a custom hostname for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientListCustomHostNameAnalysisOptions contains the optional parameters for the ContainerAppsClient.ListCustomHostNameAnalysis // method. func (client *ContainerAppsClient) ListCustomHostNameAnalysis(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientListCustomHostNameAnalysisOptions) (ContainerAppsClientListCustomHostNameAnalysisResponse, error) { + var err error req, err := client.listCustomHostNameAnalysisCreateRequest(ctx, resourceGroupName, containerAppName, options) if err != nil { return ContainerAppsClientListCustomHostNameAnalysisResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsClientListCustomHostNameAnalysisResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientListCustomHostNameAnalysisResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsClientListCustomHostNameAnalysisResponse{}, err } - return client.listCustomHostNameAnalysisHandleResponse(resp) + resp, err := client.listCustomHostNameAnalysisHandleResponse(httpResp) + return resp, err } // listCustomHostNameAnalysisCreateRequest creates the ListCustomHostNameAnalysis request. @@ -465,7 +482,7 @@ func (client *ContainerAppsClient) listCustomHostNameAnalysisCreateRequest(ctx c if options != nil && options.CustomHostname != nil { reqQP.Set("customHostname", *options.CustomHostname) } - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -483,24 +500,27 @@ func (client *ContainerAppsClient) listCustomHostNameAnalysisHandleResponse(resp // ListSecrets - List secrets for a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets // method. func (client *ContainerAppsClient) ListSecrets(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientListSecretsOptions) (ContainerAppsClientListSecretsResponse, error) { + var err error req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, containerAppName, options) if err != nil { return ContainerAppsClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. @@ -523,7 +543,7 @@ func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -538,10 +558,149 @@ func (client *ContainerAppsClient) listSecretsHandleResponse(resp *http.Response return result, nil } +// BeginStart - Start a container app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - containerAppName - Name of the Container App. +// - options - ContainerAppsClientBeginStartOptions contains the optional parameters for the ContainerAppsClient.BeginStart +// method. +func (client *ContainerAppsClient) BeginStart(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStartOptions) (*runtime.Poller[ContainerAppsClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, containerAppName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientStartResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken[ContainerAppsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// Start - Start a container app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +func (client *ContainerAppsClient) start(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStartOptions) (*http.Response, error) { + var err error + req, err := client.startCreateRequest(ctx, resourceGroupName, containerAppName, 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 +} + +// startCreateRequest creates the Start request. +func (client *ContainerAppsClient) startCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if containerAppName == "" { + return nil, errors.New("parameter containerAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) + 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-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStop - Stop a container app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - containerAppName - Name of the Container App. +// - options - ContainerAppsClientBeginStopOptions contains the optional parameters for the ContainerAppsClient.BeginStop method. +func (client *ContainerAppsClient) BeginStop(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStopOptions) (*runtime.Poller[ContainerAppsClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, containerAppName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientStopResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken[ContainerAppsClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) + } +} + +// Stop - Stop a container app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +func (client *ContainerAppsClient) stop(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStopOptions) (*http.Response, error) { + var err error + req, err := client.stopCreateRequest(ctx, resourceGroupName, containerAppName, 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 +} + +// stopCreateRequest creates the Stop request. +func (client *ContainerAppsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if containerAppName == "" { + return nil, errors.New("parameter containerAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) + 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-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + // BeginUpdate - Patches a Container App using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - containerAppEnvelope - Properties of a Container App that need to be updated @@ -553,7 +712,8 @@ func (client *ContainerAppsClient) BeginUpdate(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[ContainerAppsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ContainerAppsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ContainerAppsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -562,20 +722,22 @@ func (client *ContainerAppsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Patches a Container App using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ContainerAppsClient) update(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, containerAppName, containerAppEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -598,8 +760,11 @@ func (client *ContainerAppsClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, containerAppEnvelope) + if err := runtime.MarshalAsJSON(req, containerAppEnvelope); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client_example_test.go index a7375a42ab8a..bb1dd750acc2 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerapps_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListBySubscription.json func ExampleContainerAppsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -102,6 +102,9 @@ func ExampleContainerAppsClient_NewListBySubscriptionPager() { // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), // }, // MaxInactiveRevisions: to.Ptr[int32](10), + // Service: &armappcontainers.Service{ + // Type: to.Ptr("redis"), + // }, // }, // EventStreamEndpoint: to.Ptr("testEndpoint"), // LatestReadyRevisionName: to.Ptr("testcontainerApp0-pjxhsye"), @@ -140,6 +143,11 @@ func ExampleContainerAppsClient_NewListBySubscriptionPager() { // }, // }}, // }, + // ServiceBinds: []*armappcontainers.ServiceBind{ + // { + // Name: to.Ptr("service"), + // ServiceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service"), + // }}, // }, // WorkloadProfileName: to.Ptr("My-GP-01"), // }, @@ -148,7 +156,7 @@ func ExampleContainerAppsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListByResourceGroup.json func ExampleContainerAppsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -278,7 +286,7 @@ func ExampleContainerAppsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json func ExampleContainerAppsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -356,6 +364,9 @@ func ExampleContainerAppsClient_Get() { // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), // }, // MaxInactiveRevisions: to.Ptr[int32](10), + // Service: &armappcontainers.Service{ + // Type: to.Ptr("redis"), + // }, // }, // EventStreamEndpoint: to.Ptr("testEndpoint"), // LatestReadyRevisionName: to.Ptr("testcontainerApp0-pjxhsye"), @@ -394,13 +405,18 @@ func ExampleContainerAppsClient_Get() { // }, // }}, // }, + // ServiceBinds: []*armappcontainers.ServiceBind{ + // { + // Name: to.Ptr("service"), + // ServiceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service"), + // }}, // }, // WorkloadProfileName: to.Ptr("My-GP-01"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CreateOrUpdate.json func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -479,6 +495,9 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() }}, }, MaxInactiveRevisions: to.Ptr[int32](10), + Service: &armappcontainers.Service{ + Type: to.Ptr("redis"), + }, }, EnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), Template: &armappcontainers.Template{ @@ -530,6 +549,11 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() }, }}, }, + ServiceBinds: []*armappcontainers.ServiceBind{ + { + Name: to.Ptr("redisService"), + ServiceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService"), + }}, }, WorkloadProfileName: to.Ptr("My-GP-01"), }, @@ -664,7 +688,7 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateContainerApp() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ManagedBy_CreateOrUpdate.json func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateManagedByApp() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -800,7 +824,7 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateManagedByApp() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateTcpApp() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -934,7 +958,7 @@ func ExampleContainerAppsClient_BeginCreateOrUpdate_createOrUpdateTcpApp() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Delete.json func ExampleContainerAppsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -955,7 +979,7 @@ func ExampleContainerAppsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Patch.json func ExampleContainerAppsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1021,6 +1045,9 @@ func ExampleContainerAppsClient_BeginUpdate() { }}, }, MaxInactiveRevisions: to.Ptr[int32](10), + Service: &armappcontainers.Service{ + Type: to.Ptr("redis"), + }, }, Template: &armappcontainers.Template{ Containers: []*armappcontainers.Container{ @@ -1066,6 +1093,11 @@ func ExampleContainerAppsClient_BeginUpdate() { }, }}, }, + ServiceBinds: []*armappcontainers.ServiceBind{ + { + Name: to.Ptr("service"), + ServiceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service"), + }}, }, }, }, nil) @@ -1180,7 +1212,7 @@ func ExampleContainerAppsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListCustomHostNameAnalysis.json func ExampleContainerAppsClient_ListCustomHostNameAnalysis() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1224,7 +1256,7 @@ func ExampleContainerAppsClient_ListCustomHostNameAnalysis() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListSecrets.json func ExampleContainerAppsClient_ListSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1253,7 +1285,7 @@ func ExampleContainerAppsClient_ListSecrets() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_GetAuthToken.json func ExampleContainerAppsClient_GetAuthToken() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1282,3 +1314,249 @@ func ExampleContainerAppsClient_GetAuthToken() { // }, // } } + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Start.json +func ExampleContainerAppsClient_BeginStart() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewContainerAppsClient().BeginStart(ctx, "rg", "testWorkerApp0", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.ContainerApp = armappcontainers.ContainerApp{ + // Name: to.Ptr("testcontainerApp0"), + // Type: to.Ptr("Microsoft.App/containerApps"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0"), + // Location: to.Ptr("East US"), + // Properties: &armappcontainers.ContainerAppProperties{ + // Configuration: &armappcontainers.Configuration{ + // Dapr: &armappcontainers.Dapr{ + // AppPort: to.Ptr[int32](3000), + // AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), + // EnableAPILogging: to.Ptr(true), + // Enabled: to.Ptr(true), + // HTTPMaxRequestSize: to.Ptr[int32](10), + // HTTPReadBufferSize: to.Ptr[int32](30), + // LogLevel: to.Ptr(armappcontainers.LogLevelDebug), + // }, + // Ingress: &armappcontainers.Ingress{ + // CustomDomains: []*armappcontainers.CustomDomain{ + // { + // Name: to.Ptr("www.my-name.com"), + // BindingType: to.Ptr(armappcontainers.BindingTypeSniEnabled), + // CertificateID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + // }, + // { + // Name: to.Ptr("www.my--other-name.com"), + // BindingType: to.Ptr(armappcontainers.BindingTypeSniEnabled), + // CertificateID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), + // }}, + // External: to.Ptr(true), + // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), + // IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ + // { + // Name: to.Ptr("Allow work IP A subnet"), + // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), + // Action: to.Ptr(armappcontainers.ActionAllow), + // IPAddressRange: to.Ptr("192.168.1.1/32"), + // }, + // { + // Name: to.Ptr("Allow work IP B subnet"), + // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), + // Action: to.Ptr(armappcontainers.ActionAllow), + // IPAddressRange: to.Ptr("192.168.1.1/8"), + // }}, + // TargetPort: to.Ptr[int32](3000), + // Traffic: []*armappcontainers.TrafficWeight{ + // { + // RevisionName: to.Ptr("testcontainerApp0-ab1234"), + // Weight: to.Ptr[int32](80), + // }, + // { + // Label: to.Ptr("staging"), + // RevisionName: to.Ptr("testcontainerApp0-ab4321"), + // Weight: to.Ptr[int32](20), + // }}, + // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), + // }, + // MaxInactiveRevisions: to.Ptr[int32](10), + // }, + // EventStreamEndpoint: to.Ptr("testEndpoint"), + // LatestReadyRevisionName: to.Ptr("testcontainerApp0-pjxhsye"), + // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), + // ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), + // ProvisioningState: to.Ptr(armappcontainers.ContainerAppProvisioningStateSucceeded), + // Template: &armappcontainers.Template{ + // Containers: []*armappcontainers.Container{ + // { + // Name: to.Ptr("testcontainerApp0"), + // Image: to.Ptr("repo/testcontainerApp0:v4"), + // Resources: &armappcontainers.ContainerResources{ + // CPU: to.Ptr[float64](0.2), + // Memory: to.Ptr("100Mi"), + // }, + // }}, + // InitContainers: []*armappcontainers.InitContainer{ + // { + // Name: to.Ptr("testinitcontainerApp0"), + // Image: to.Ptr("repo/testcontainerApp0:v4"), + // Resources: &armappcontainers.ContainerResources{ + // CPU: to.Ptr[float64](0.2), + // Memory: to.Ptr("100Mi"), + // }, + // }}, + // Scale: &armappcontainers.Scale{ + // MaxReplicas: to.Ptr[int32](5), + // MinReplicas: to.Ptr[int32](1), + // Rules: []*armappcontainers.ScaleRule{ + // { + // Name: to.Ptr("httpscalingrule"), + // HTTP: &armappcontainers.HTTPScaleRule{ + // Metadata: map[string]*string{ + // "concurrentRequests": to.Ptr("50"), + // }, + // }, + // }}, + // }, + // }, + // WorkloadProfileName: to.Ptr("My-GP-01"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Stop.json +func ExampleContainerAppsClient_BeginStop() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewContainerAppsClient().BeginStop(ctx, "rg", "testWorkerApp0", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.ContainerApp = armappcontainers.ContainerApp{ + // Name: to.Ptr("testcontainerApp0"), + // Type: to.Ptr("Microsoft.App/containerApps"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0"), + // Location: to.Ptr("East US"), + // Properties: &armappcontainers.ContainerAppProperties{ + // Configuration: &armappcontainers.Configuration{ + // Dapr: &armappcontainers.Dapr{ + // AppPort: to.Ptr[int32](3000), + // AppProtocol: to.Ptr(armappcontainers.AppProtocolHTTP), + // EnableAPILogging: to.Ptr(true), + // Enabled: to.Ptr(true), + // HTTPMaxRequestSize: to.Ptr[int32](10), + // HTTPReadBufferSize: to.Ptr[int32](30), + // LogLevel: to.Ptr(armappcontainers.LogLevelDebug), + // }, + // Ingress: &armappcontainers.Ingress{ + // CustomDomains: []*armappcontainers.CustomDomain{ + // { + // Name: to.Ptr("www.my-name.com"), + // BindingType: to.Ptr(armappcontainers.BindingTypeSniEnabled), + // CertificateID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + // }, + // { + // Name: to.Ptr("www.my--other-name.com"), + // BindingType: to.Ptr(armappcontainers.BindingTypeSniEnabled), + // CertificateID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), + // }}, + // External: to.Ptr(true), + // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), + // IPSecurityRestrictions: []*armappcontainers.IPSecurityRestrictionRule{ + // { + // Name: to.Ptr("Allow work IP A subnet"), + // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), + // Action: to.Ptr(armappcontainers.ActionAllow), + // IPAddressRange: to.Ptr("192.168.1.1/32"), + // }, + // { + // Name: to.Ptr("Allow work IP B subnet"), + // Description: to.Ptr("Allowing all IP's within the subnet below to access containerapp"), + // Action: to.Ptr(armappcontainers.ActionAllow), + // IPAddressRange: to.Ptr("192.168.1.1/8"), + // }}, + // TargetPort: to.Ptr[int32](3000), + // Traffic: []*armappcontainers.TrafficWeight{ + // { + // RevisionName: to.Ptr("testcontainerApp0-ab1234"), + // Weight: to.Ptr[int32](80), + // }, + // { + // Label: to.Ptr("staging"), + // RevisionName: to.Ptr("testcontainerApp0-ab4321"), + // Weight: to.Ptr[int32](20), + // }}, + // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), + // }, + // MaxInactiveRevisions: to.Ptr[int32](10), + // }, + // EventStreamEndpoint: to.Ptr("testEndpoint"), + // LatestReadyRevisionName: to.Ptr("testcontainerApp0-pjxhsye"), + // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), + // ManagedEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), + // ProvisioningState: to.Ptr(armappcontainers.ContainerAppProvisioningStateSucceeded), + // Template: &armappcontainers.Template{ + // Containers: []*armappcontainers.Container{ + // { + // Name: to.Ptr("testcontainerApp0"), + // Image: to.Ptr("repo/testcontainerApp0:v4"), + // Resources: &armappcontainers.ContainerResources{ + // CPU: to.Ptr[float64](0.2), + // Memory: to.Ptr("100Mi"), + // }, + // }}, + // InitContainers: []*armappcontainers.InitContainer{ + // { + // Name: to.Ptr("testinitcontainerApp0"), + // Image: to.Ptr("repo/testcontainerApp0:v4"), + // Resources: &armappcontainers.ContainerResources{ + // CPU: to.Ptr[float64](0.2), + // Memory: to.Ptr("100Mi"), + // }, + // }}, + // Scale: &armappcontainers.Scale{ + // MaxReplicas: to.Ptr[int32](5), + // MinReplicas: to.Ptr[int32](1), + // Rules: []*armappcontainers.ScaleRule{ + // { + // Name: to.Ptr("httpscalingrule"), + // HTTP: &armappcontainers.HTTPScaleRule{ + // Metadata: map[string]*string{ + // "concurrentRequests": to.Ptr("50"), + // }, + // }, + // }}, + // }, + // }, + // WorkloadProfileName: to.Ptr("My-GP-01"), + // }, + // } +} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsapi_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsapi_client.go new file mode 100644 index 000000000000..457b905ca839 --- /dev/null +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsapi_client.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappcontainers + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ContainerAppsAPIClient contains the methods for the ContainerAppsAPIClient group. +// Don't use this type directly, use NewContainerAppsAPIClient() instead. +type ContainerAppsAPIClient struct { + internal *arm.Client + subscriptionID string +} + +// NewContainerAppsAPIClient creates a new instance of ContainerAppsAPIClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewContainerAppsAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsAPIClient, error) { + cl, err := arm.NewClient(moduleName+".ContainerAppsAPIClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ContainerAppsAPIClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// JobExecution - Get details of a single job execution +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - jobName - Job Name +// - jobExecutionName - Job execution name. +// - options - ContainerAppsAPIClientJobExecutionOptions contains the optional parameters for the ContainerAppsAPIClient.JobExecution +// method. +func (client *ContainerAppsAPIClient) JobExecution(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, options *ContainerAppsAPIClientJobExecutionOptions) (ContainerAppsAPIClientJobExecutionResponse, error) { + var err error + req, err := client.jobExecutionCreateRequest(ctx, resourceGroupName, jobName, jobExecutionName, options) + if err != nil { + return ContainerAppsAPIClientJobExecutionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerAppsAPIClientJobExecutionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsAPIClientJobExecutionResponse{}, err + } + resp, err := client.jobExecutionHandleResponse(httpResp) + return resp, err +} + +// jobExecutionCreateRequest creates the JobExecution request. +func (client *ContainerAppsAPIClient) jobExecutionCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, options *ContainerAppsAPIClientJobExecutionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if jobExecutionName == "" { + return nil, errors.New("parameter jobExecutionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobExecutionName}", url.PathEscape(jobExecutionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// jobExecutionHandleResponse handles the JobExecution response. +func (client *ContainerAppsAPIClient) jobExecutionHandleResponse(resp *http.Response) (ContainerAppsAPIClientJobExecutionResponse, error) { + result := ContainerAppsAPIClientJobExecutionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobExecution); err != nil { + return ContainerAppsAPIClientJobExecutionResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsapi_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsapi_client_example_test.go new file mode 100644 index 000000000000..235d6845ccc0 --- /dev/null +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsapi_client_example_test.go @@ -0,0 +1,69 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armappcontainers_test + +import ( + "context" + "log" + + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" +) + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Execution_Get.json +func ExampleContainerAppsAPIClient_JobExecution() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewContainerAppsAPIClient().JobExecution(ctx, "rg", "testcontainerAppsJob0", "jobExecution1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.JobExecution = armappcontainers.JobExecution{ + // Name: to.Ptr("jobExecution1"), + // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-13T20:47:30+00:00"); return t}()), + // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-13T20:37:30+00:00"); return t}()), + // Status: to.Ptr(armappcontainers.JobExecutionRunningStateRunning), + // Template: &armappcontainers.JobExecutionTemplate{ + // Containers: []*armappcontainers.JobExecutionContainer{ + // { + // Name: to.Ptr("testcontainerAppsJob0"), + // Image: to.Ptr("repo/testcontainerAppsJob0:v4"), + // Resources: &armappcontainers.ContainerResources{ + // CPU: to.Ptr[float64](0.2), + // Memory: to.Ptr("100Mi"), + // }, + // }}, + // InitContainers: []*armappcontainers.JobExecutionContainer{ + // { + // Name: to.Ptr("testinitcontainerAppsJob0"), + // Args: []*string{ + // to.Ptr("-c"), + // to.Ptr("while true; do echo hello; sleep 10;done")}, + // Command: []*string{ + // to.Ptr("/bin/sh")}, + // Image: to.Ptr("repo/testcontainerAppsJob0:v4"), + // Resources: &armappcontainers.ContainerResources{ + // CPU: to.Ptr[float64](0.2), + // Memory: to.Ptr("100Mi"), + // }, + // }}, + // }, + // } +} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client.go index cec5e70a55f0..c39f4b9d463f 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewContainerAppsAuthConfigsClient(subscriptionID string, credential azcore. // CreateOrUpdate - Create or update the AuthConfig for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -55,18 +54,21 @@ func NewContainerAppsAuthConfigsClient(subscriptionID string, credential azcore. // - options - ContainerAppsAuthConfigsClientCreateOrUpdateOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.CreateOrUpdate // method. func (client *ContainerAppsAuthConfigsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, authConfigEnvelope AuthConfig, options *ContainerAppsAuthConfigsClientCreateOrUpdateOptions) (ContainerAppsAuthConfigsClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, options) if err != nil { return ContainerAppsAuthConfigsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsAuthConfigsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsAuthConfigsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsAuthConfigsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,10 +95,13 @@ func (client *ContainerAppsAuthConfigsClient) createOrUpdateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, authConfigEnvelope) + if err := runtime.MarshalAsJSON(req, authConfigEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,23 +116,25 @@ func (client *ContainerAppsAuthConfigsClient) createOrUpdateHandleResponse(resp // Delete - Delete a Container App AuthConfig. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. // - options - ContainerAppsAuthConfigsClientDeleteOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.Delete // method. func (client *ContainerAppsAuthConfigsClient) Delete(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, options *ContainerAppsAuthConfigsClientDeleteOptions) (ContainerAppsAuthConfigsClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, containerAppName, authConfigName, options) if err != nil { return ContainerAppsAuthConfigsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsAuthConfigsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ContainerAppsAuthConfigsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsAuthConfigsClientDeleteResponse{}, err } return ContainerAppsAuthConfigsClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,25 +172,28 @@ func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Co // Get - Get a AuthConfig of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. // - options - ContainerAppsAuthConfigsClientGetOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.Get // method. func (client *ContainerAppsAuthConfigsClient) Get(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, options *ContainerAppsAuthConfigsClientGetOptions) (ContainerAppsAuthConfigsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, containerAppName, authConfigName, options) if err != nil { return ContainerAppsAuthConfigsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsAuthConfigsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsAuthConfigsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsAuthConfigsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -210,7 +220,7 @@ func (client *ContainerAppsAuthConfigsClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,7 +237,7 @@ func (client *ContainerAppsAuthConfigsClient) getHandleResponse(resp *http.Respo // NewListByContainerAppPager - Get the Container App AuthConfigs in a given resource group. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsAuthConfigsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.NewListByContainerAppPager @@ -280,7 +290,7 @@ func (client *ContainerAppsAuthConfigsClient) listByContainerAppCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client_example_test.go index 3db095ba8a45..b6b6d1163f5b 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsauthconfigs_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_ListByContainer.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_ListByContainer.json func ExampleContainerAppsAuthConfigsClient_NewListByContainerAppPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -67,7 +67,7 @@ func ExampleContainerAppsAuthConfigsClient_NewListByContainerAppPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Get.json func ExampleContainerAppsAuthConfigsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -108,7 +108,7 @@ func ExampleContainerAppsAuthConfigsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_CreateOrUpdate.json func ExampleContainerAppsAuthConfigsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -166,7 +166,7 @@ func ExampleContainerAppsAuthConfigsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Delete.json func ExampleContainerAppsAuthConfigsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client.go index 9c9e36ff9293..d0f7886e3dfc 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,25 +46,28 @@ func NewContainerAppsDiagnosticsClient(subscriptionID string, credential azcore. // GetDetector - Get a diagnostics result of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - detectorName - Name of the Container App Detector. // - options - ContainerAppsDiagnosticsClientGetDetectorOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetDetector // method. func (client *ContainerAppsDiagnosticsClient) GetDetector(ctx context.Context, resourceGroupName string, containerAppName string, detectorName string, options *ContainerAppsDiagnosticsClientGetDetectorOptions) (ContainerAppsDiagnosticsClientGetDetectorResponse, error) { + var err error req, err := client.getDetectorCreateRequest(ctx, resourceGroupName, containerAppName, detectorName, options) if err != nil { return ContainerAppsDiagnosticsClientGetDetectorResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsDiagnosticsClientGetDetectorResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsDiagnosticsClientGetDetectorResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsDiagnosticsClientGetDetectorResponse{}, err } - return client.getDetectorHandleResponse(resp) + resp, err := client.getDetectorHandleResponse(httpResp) + return resp, err } // getDetectorCreateRequest creates the GetDetector request. @@ -92,7 +94,7 @@ func (client *ContainerAppsDiagnosticsClient) getDetectorCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,25 +112,28 @@ func (client *ContainerAppsDiagnosticsClient) getDetectorHandleResponse(resp *ht // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. // - options - ContainerAppsDiagnosticsClientGetRevisionOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRevision // method. func (client *ContainerAppsDiagnosticsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsDiagnosticsClientGetRevisionOptions) (ContainerAppsDiagnosticsClientGetRevisionResponse, error) { + var err error req, err := client.getRevisionCreateRequest(ctx, resourceGroupName, containerAppName, revisionName, options) if err != nil { return ContainerAppsDiagnosticsClientGetRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsDiagnosticsClientGetRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsDiagnosticsClientGetRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsDiagnosticsClientGetRevisionResponse{}, err } - return client.getRevisionHandleResponse(resp) + resp, err := client.getRevisionHandleResponse(httpResp) + return resp, err } // getRevisionCreateRequest creates the GetRevision request. @@ -155,7 +160,7 @@ func (client *ContainerAppsDiagnosticsClient) getRevisionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,24 +178,27 @@ func (client *ContainerAppsDiagnosticsClient) getRevisionHandleResponse(resp *ht // GetRoot - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsDiagnosticsClientGetRootOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRoot // method. func (client *ContainerAppsDiagnosticsClient) GetRoot(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientGetRootOptions) (ContainerAppsDiagnosticsClientGetRootResponse, error) { + var err error req, err := client.getRootCreateRequest(ctx, resourceGroupName, containerAppName, options) if err != nil { return ContainerAppsDiagnosticsClientGetRootResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsDiagnosticsClientGetRootResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsDiagnosticsClientGetRootResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsDiagnosticsClientGetRootResponse{}, err } - return client.getRootHandleResponse(resp) + resp, err := client.getRootHandleResponse(httpResp) + return resp, err } // getRootCreateRequest creates the GetRoot request. @@ -213,7 +221,7 @@ func (client *ContainerAppsDiagnosticsClient) getRootCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -230,7 +238,7 @@ func (client *ContainerAppsDiagnosticsClient) getRootHandleResponse(resp *http.R // NewListDetectorsPager - Get the list of diagnostics for a given Container App. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which detector info is needed. // - options - ContainerAppsDiagnosticsClientListDetectorsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListDetectorsPager @@ -283,7 +291,7 @@ func (client *ContainerAppsDiagnosticsClient) listDetectorsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -300,7 +308,7 @@ func (client *ContainerAppsDiagnosticsClient) listDetectorsHandleResponse(resp * // NewListRevisionsPager - Get the Revisions for a given Container App. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which Revisions are needed. // - options - ContainerAppsDiagnosticsClientListRevisionsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListRevisionsPager @@ -353,7 +361,7 @@ func (client *ContainerAppsDiagnosticsClient) listRevisionsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client_example_test.go index 99f11a5c1ee2..63d3e16735f0 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsdiagnostics_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_List.json func ExampleContainerAppsDiagnosticsClient_NewListDetectorsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -67,7 +67,7 @@ func ExampleContainerAppsDiagnosticsClient_NewListDetectorsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_Get.json func ExampleContainerAppsDiagnosticsClient_GetDetector() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -139,7 +139,7 @@ func ExampleContainerAppsDiagnosticsClient_GetDetector() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json func ExampleContainerAppsDiagnosticsClient_NewListRevisionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -204,7 +204,7 @@ func ExampleContainerAppsDiagnosticsClient_NewListRevisionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json func ExampleContainerAppsDiagnosticsClient_GetRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -232,6 +232,7 @@ func ExampleContainerAppsDiagnosticsClient_GetRevision() { // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.politehill-ab123456.eastus.azurecontainerapps.io"), // LastActiveTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), // Replicas: to.Ptr[int32](1), + // RunningState: to.Ptr(armappcontainers.RevisionRunningStateRunning), // Template: &armappcontainers.Template{ // Containers: []*armappcontainers.Container{ // { @@ -261,7 +262,7 @@ func ExampleContainerAppsDiagnosticsClient_GetRevision() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json func ExampleContainerAppsDiagnosticsClient_GetRoot() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -339,6 +340,9 @@ func ExampleContainerAppsDiagnosticsClient_GetRoot() { // Transport: to.Ptr(armappcontainers.IngressTransportMethodAuto), // }, // MaxInactiveRevisions: to.Ptr[int32](10), + // Service: &armappcontainers.Service{ + // Type: to.Ptr("redis"), + // }, // }, // EventStreamEndpoint: to.Ptr("testEndpoint"), // LatestReadyRevisionName: to.Ptr("testcontainerApp0-pjxhsye"), @@ -377,6 +381,11 @@ func ExampleContainerAppsDiagnosticsClient_GetRoot() { // }, // }}, // }, + // ServiceBinds: []*armappcontainers.ServiceBind{ + // { + // Name: to.Ptr("service"), + // ServiceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service"), + // }}, // }, // WorkloadProfileName: to.Ptr("My-GP-01"), // }, diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client.go index a1a0137ae98a..dd74d217a10e 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewContainerAppsRevisionReplicasClient(subscriptionID string, credential az // GetReplica - Get a replica for a Container App Revision. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -55,18 +54,21 @@ func NewContainerAppsRevisionReplicasClient(subscriptionID string, credential az // - options - ContainerAppsRevisionReplicasClientGetReplicaOptions contains the optional parameters for the ContainerAppsRevisionReplicasClient.GetReplica // method. func (client *ContainerAppsRevisionReplicasClient) GetReplica(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, replicaName string, options *ContainerAppsRevisionReplicasClientGetReplicaOptions) (ContainerAppsRevisionReplicasClientGetReplicaResponse, error) { + var err error req, err := client.getReplicaCreateRequest(ctx, resourceGroupName, containerAppName, revisionName, replicaName, options) if err != nil { return ContainerAppsRevisionReplicasClientGetReplicaResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionReplicasClientGetReplicaResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionReplicasClientGetReplicaResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionReplicasClientGetReplicaResponse{}, err } - return client.getReplicaHandleResponse(resp) + resp, err := client.getReplicaHandleResponse(httpResp) + return resp, err } // getReplicaCreateRequest creates the GetReplica request. @@ -97,7 +99,7 @@ func (client *ContainerAppsRevisionReplicasClient) getReplicaCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,25 +117,28 @@ func (client *ContainerAppsRevisionReplicasClient) getReplicaHandleResponse(resp // ListReplicas - List replicas for a Container App Revision. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. // - options - ContainerAppsRevisionReplicasClientListReplicasOptions contains the optional parameters for the ContainerAppsRevisionReplicasClient.ListReplicas // method. func (client *ContainerAppsRevisionReplicasClient) ListReplicas(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionReplicasClientListReplicasOptions) (ContainerAppsRevisionReplicasClientListReplicasResponse, error) { + var err error req, err := client.listReplicasCreateRequest(ctx, resourceGroupName, containerAppName, revisionName, options) if err != nil { return ContainerAppsRevisionReplicasClientListReplicasResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionReplicasClientListReplicasResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionReplicasClientListReplicasResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionReplicasClientListReplicasResponse{}, err } - return client.listReplicasHandleResponse(resp) + resp, err := client.listReplicasHandleResponse(httpResp) + return resp, err } // listReplicasCreateRequest creates the ListReplicas request. @@ -160,7 +165,7 @@ func (client *ContainerAppsRevisionReplicasClient) listReplicasCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client_example_test.go index dbe619cf87d3..851889605824 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisionreplicas_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_Get.json func ExampleContainerAppsRevisionReplicasClient_GetReplica() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -48,14 +48,20 @@ func ExampleContainerAppsRevisionReplicasClient_GetReplica() { // LogStreamEndpoint: to.Ptr("testLogStreamEndpoint"), // Ready: to.Ptr(true), // RestartCount: to.Ptr[int32](0), + // RunningState: to.Ptr(armappcontainers.ContainerAppContainerRunningStateRunning), + // RunningStateDetails: to.Ptr("testDetail"), // Started: to.Ptr(true), // }}, // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-25T19:42:45Z"); return t}()), + // InitContainers: []*armappcontainers.ReplicaContainer{ + // }, + // RunningState: to.Ptr(armappcontainers.ContainerAppReplicaRunningStateRunning), + // RunningStateDetails: to.Ptr("testDetail"), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_List.json func ExampleContainerAppsRevisionReplicasClient_ListReplicas() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -88,9 +94,15 @@ func ExampleContainerAppsRevisionReplicasClient_ListReplicas() { // LogStreamEndpoint: to.Ptr("testLogStreamEndpoint"), // Ready: to.Ptr(true), // RestartCount: to.Ptr[int32](0), + // RunningState: to.Ptr(armappcontainers.ContainerAppContainerRunningStateRunning), + // RunningStateDetails: to.Ptr("testDetail"), // Started: to.Ptr(true), // }}, // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-25T19:42:45Z"); return t}()), + // InitContainers: []*armappcontainers.ReplicaContainer{ + // }, + // RunningState: to.Ptr(armappcontainers.ContainerAppReplicaRunningStateRunning), + // RunningStateDetails: to.Ptr("testDetail"), // }, // }}, // } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client.go index 1c1f7fce3e9c..6ce5588674f2 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,23 +46,25 @@ func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.To // ActivateRevision - Activates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. // - options - ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision // method. func (client *ContainerAppsRevisionsClient) ActivateRevision(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionsClientActivateRevisionOptions) (ContainerAppsRevisionsClientActivateRevisionResponse, error) { + var err error req, err := client.activateRevisionCreateRequest(ctx, resourceGroupName, containerAppName, revisionName, options) if err != nil { return ContainerAppsRevisionsClientActivateRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionsClientActivateRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientActivateRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientActivateRevisionResponse{}, err } return ContainerAppsRevisionsClientActivateRevisionResponse{}, nil } @@ -92,7 +93,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -101,23 +102,25 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co // DeactivateRevision - Deactivates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. // - options - ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision // method. func (client *ContainerAppsRevisionsClient) DeactivateRevision(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionsClientDeactivateRevisionOptions) (ContainerAppsRevisionsClientDeactivateRevisionResponse, error) { + var err error req, err := client.deactivateRevisionCreateRequest(ctx, resourceGroupName, containerAppName, revisionName, options) if err != nil { return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err } return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, nil } @@ -146,7 +149,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -155,25 +158,28 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. // - options - ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision // method. func (client *ContainerAppsRevisionsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionsClientGetRevisionOptions) (ContainerAppsRevisionsClientGetRevisionResponse, error) { + var err error req, err := client.getRevisionCreateRequest(ctx, resourceGroupName, containerAppName, revisionName, options) if err != nil { return ContainerAppsRevisionsClientGetRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionsClientGetRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientGetRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientGetRevisionResponse{}, err } - return client.getRevisionHandleResponse(resp) + resp, err := client.getRevisionHandleResponse(httpResp) + return resp, err } // getRevisionCreateRequest creates the GetRevision request. @@ -200,7 +206,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,7 +223,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http // NewListRevisionsPager - Get the Revisions for a given Container App. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which Revisions are needed. // - options - ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager @@ -270,7 +276,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -291,23 +297,25 @@ func (client *ContainerAppsRevisionsClient) listRevisionsHandleResponse(resp *ht // RestartRevision - Restarts a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. // - options - ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision // method. func (client *ContainerAppsRevisionsClient) RestartRevision(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionsClientRestartRevisionOptions) (ContainerAppsRevisionsClientRestartRevisionResponse, error) { + var err error req, err := client.restartRevisionCreateRequest(ctx, resourceGroupName, containerAppName, revisionName, options) if err != nil { return ContainerAppsRevisionsClientRestartRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionsClientRestartRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientRestartRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientRestartRevisionResponse{}, err } return ContainerAppsRevisionsClientRestartRevisionResponse{}, nil } @@ -336,7 +344,7 @@ func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client_example_test.go index 82a1a713f28c..7742684f8fc4 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappsrevisions_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json func ExampleContainerAppsRevisionsClient_NewListRevisionsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,7 +82,7 @@ func ExampleContainerAppsRevisionsClient_NewListRevisionsPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json func ExampleContainerAppsRevisionsClient_GetRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -110,6 +110,7 @@ func ExampleContainerAppsRevisionsClient_GetRevision() { // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.politehill-ab123456.eastus.azurecontainerapps.io"), // LastActiveTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), // Replicas: to.Ptr[int32](1), + // RunningState: to.Ptr(armappcontainers.RevisionRunningStateRunning), // Template: &armappcontainers.Template{ // Containers: []*armappcontainers.Container{ // { @@ -139,7 +140,7 @@ func ExampleContainerAppsRevisionsClient_GetRevision() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Activate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Activate.json func ExampleContainerAppsRevisionsClient_ActivateRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -156,7 +157,7 @@ func ExampleContainerAppsRevisionsClient_ActivateRevision() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Deactivate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Deactivate.json func ExampleContainerAppsRevisionsClient_DeactivateRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -173,7 +174,7 @@ func ExampleContainerAppsRevisionsClient_DeactivateRevision() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Restart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Restart.json func ExampleContainerAppsRevisionsClient_RestartRevision() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client.go index 72ce2837ec78..001f5ecd6a89 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewContainerAppsSourceControlsClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Create or update the SourceControl for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -60,7 +59,8 @@ func (client *ContainerAppsSourceControlsClient) BeginCreateOrUpdate(ctx context if err != nil { return nil, err } - return runtime.NewPoller[ContainerAppsSourceControlsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ContainerAppsSourceControlsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ContainerAppsSourceControlsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -69,20 +69,22 @@ func (client *ContainerAppsSourceControlsClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Create or update the SourceControl for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ContainerAppsSourceControlsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, sourceControlEnvelope SourceControl, options *ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -109,16 +111,19 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, sourceControlEnvelope) + if err := runtime.MarshalAsJSON(req, sourceControlEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a Container App SourceControl. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -130,7 +135,8 @@ func (client *ContainerAppsSourceControlsClient) BeginDelete(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller[ContainerAppsSourceControlsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ContainerAppsSourceControlsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ContainerAppsSourceControlsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -139,20 +145,22 @@ func (client *ContainerAppsSourceControlsClient) BeginDelete(ctx context.Context // Delete - Delete a Container App SourceControl. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ContainerAppsSourceControlsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, options *ContainerAppsSourceControlsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, containerAppName, sourceControlName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -179,7 +187,7 @@ func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,25 +196,28 @@ func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context // Get - Get a SourceControl of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. // - options - ContainerAppsSourceControlsClientGetOptions contains the optional parameters for the ContainerAppsSourceControlsClient.Get // method. func (client *ContainerAppsSourceControlsClient) Get(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, options *ContainerAppsSourceControlsClientGetOptions) (ContainerAppsSourceControlsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, containerAppName, sourceControlName, options) if err != nil { return ContainerAppsSourceControlsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsSourceControlsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsSourceControlsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsSourceControlsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -233,7 +244,7 @@ func (client *ContainerAppsSourceControlsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +261,7 @@ func (client *ContainerAppsSourceControlsClient) getHandleResponse(resp *http.Re // NewListByContainerAppPager - Get the Container App SourceControls in a given resource group. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsSourceControlsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsSourceControlsClient.NewListByContainerAppPager @@ -303,7 +314,7 @@ func (client *ContainerAppsSourceControlsClient) listByContainerAppCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client_example_test.go index 35412f4c0de2..fbbaeb95c598 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/containerappssourcecontrols_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_ListByContainer.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_ListByContainer.json func ExampleContainerAppsSourceControlsClient_NewListByContainerAppPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -63,7 +63,7 @@ func ExampleContainerAppsSourceControlsClient_NewListByContainerAppPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Get.json func ExampleContainerAppsSourceControlsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -100,7 +100,7 @@ func ExampleContainerAppsSourceControlsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_CreateOrUpdate.json func ExampleContainerAppsSourceControlsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -118,14 +118,16 @@ func ExampleContainerAppsSourceControlsClient_BeginCreateOrUpdate() { AzureCredentials: &armappcontainers.AzureCredentials{ ClientID: to.Ptr(""), ClientSecret: to.Ptr(""), + Kind: to.Ptr("feaderated"), TenantID: to.Ptr(""), }, - ContextPath: to.Ptr("./"), - Image: to.Ptr("image/tag"), + ContextPath: to.Ptr("./"), + GithubPersonalAccessToken: to.Ptr("test"), + Image: to.Ptr("image/tag"), RegistryInfo: &armappcontainers.RegistryInfo{ RegistryPassword: to.Ptr(""), - RegistryURL: to.Ptr("xwang971reg.azurecr.io"), - RegistryUserName: to.Ptr("xwang971reg"), + RegistryURL: to.Ptr("test-registry.azurecr.io"), + RegistryUserName: to.Ptr("test-registry"), }, }, RepoURL: to.Ptr("https://github.com/xwang971/ghatest"), @@ -151,8 +153,8 @@ func ExampleContainerAppsSourceControlsClient_BeginCreateOrUpdate() { // ContextPath: to.Ptr("./"), // Image: to.Ptr("image/tag"), // RegistryInfo: &armappcontainers.RegistryInfo{ - // RegistryURL: to.Ptr("xwang971reg.azurecr.io"), - // RegistryUserName: to.Ptr("xwang971reg"), + // RegistryURL: to.Ptr("test-registry.azurecr.io"), + // RegistryUserName: to.Ptr("testreg"), // }, // }, // OperationState: to.Ptr(armappcontainers.SourceControlOperationStateInProgress), @@ -161,7 +163,7 @@ func ExampleContainerAppsSourceControlsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Delete.json func ExampleContainerAppsSourceControlsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client.go index 002ca5c3358e..860ac0160569 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewDaprComponentsClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Creates or updates a Dapr Component in a Managed Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -55,18 +54,21 @@ func NewDaprComponentsClient(subscriptionID string, credential azcore.TokenCrede // - options - DaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the DaprComponentsClient.CreateOrUpdate // method. func (client *DaprComponentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, componentName string, daprComponentEnvelope DaprComponent, options *DaprComponentsClientCreateOrUpdateOptions) (DaprComponentsClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, environmentName, componentName, daprComponentEnvelope, options) if err != nil { return DaprComponentsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DaprComponentsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DaprComponentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DaprComponentsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,10 +95,13 @@ func (client *DaprComponentsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, daprComponentEnvelope) + if err := runtime.MarshalAsJSON(req, daprComponentEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,22 +116,24 @@ func (client *DaprComponentsClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete a Dapr Component from a Managed Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. // - options - DaprComponentsClientDeleteOptions contains the optional parameters for the DaprComponentsClient.Delete method. func (client *DaprComponentsClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, componentName string, options *DaprComponentsClientDeleteOptions) (DaprComponentsClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, environmentName, componentName, options) if err != nil { return DaprComponentsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DaprComponentsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DaprComponentsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DaprComponentsClientDeleteResponse{}, err } return DaprComponentsClientDeleteResponse{}, nil } @@ -155,7 +162,7 @@ func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -164,24 +171,27 @@ func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, res // Get - Get a dapr component. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. // - options - DaprComponentsClientGetOptions contains the optional parameters for the DaprComponentsClient.Get method. func (client *DaprComponentsClient) Get(ctx context.Context, resourceGroupName string, environmentName string, componentName string, options *DaprComponentsClientGetOptions) (DaprComponentsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, environmentName, componentName, options) if err != nil { return DaprComponentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DaprComponentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DaprComponentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DaprComponentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -208,7 +218,7 @@ func (client *DaprComponentsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +235,7 @@ func (client *DaprComponentsClient) getHandleResponse(resp *http.Response) (Dapr // NewListPager - Get the Dapr Components for a managed environment. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - DaprComponentsClientListOptions contains the optional parameters for the DaprComponentsClient.NewListPager method. @@ -277,7 +287,7 @@ func (client *DaprComponentsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -295,25 +305,28 @@ func (client *DaprComponentsClient) listHandleResponse(resp *http.Response) (Dap // ListSecrets - List secrets for a dapr component // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. // - options - DaprComponentsClientListSecretsOptions contains the optional parameters for the DaprComponentsClient.ListSecrets // method. func (client *DaprComponentsClient) ListSecrets(ctx context.Context, resourceGroupName string, environmentName string, componentName string, options *DaprComponentsClientListSecretsOptions) (DaprComponentsClientListSecretsResponse, error) { + var err error req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, environmentName, componentName, options) if err != nil { return DaprComponentsClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DaprComponentsClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DaprComponentsClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DaprComponentsClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. @@ -340,7 +353,7 @@ func (client *DaprComponentsClient) listSecretsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client_example_test.go index 1b10edcd030d..2eb00fbed860 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/daprcomponents_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_List.json func ExampleDaprComponentsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -145,7 +145,7 @@ func ExampleDaprComponentsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_SecretStoreComponent.json func ExampleDaprComponentsClient_Get_getDaprComponentWithSecretStoreComponent() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -197,7 +197,7 @@ func ExampleDaprComponentsClient_Get_getDaprComponentWithSecretStoreComponent() // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_Secrets.json func ExampleDaprComponentsClient_Get_getDaprComponentWithSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -252,7 +252,7 @@ func ExampleDaprComponentsClient_Get_getDaprComponentWithSecrets() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json func ExampleDaprComponentsClient_CreateOrUpdate_createOrUpdateDaprComponentWithSecretStoreComponent() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -332,7 +332,7 @@ func ExampleDaprComponentsClient_CreateOrUpdate_createOrUpdateDaprComponentWithS // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_Secrets.json func ExampleDaprComponentsClient_CreateOrUpdate_createOrUpdateDaprComponentWithSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -419,7 +419,7 @@ func ExampleDaprComponentsClient_CreateOrUpdate_createOrUpdateDaprComponentWithS // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Delete.json func ExampleDaprComponentsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -436,7 +436,7 @@ func ExampleDaprComponentsClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_ListSecrets.json func ExampleDaprComponentsClient_ListSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/go.mod b/sdk/resourcemanager/appcontainers/armappcontainers/go.mod index 10ebb376c6ad..836fcf4641a8 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/go.mod +++ b/sdk/resourcemanager/appcontainers/armappcontainers/go.mod @@ -3,19 +3,19 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armap go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect ) diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/go.sum b/sdk/resourcemanager/appcontainers/armappcontainers/go.sum index 8ba445a8c4da..ee2bc4389c66 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/go.sum +++ b/sdk/resourcemanager/appcontainers/armappcontainers/go.sum @@ -1,13 +1,13 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 h1:SEy2xmstIphdPwNBUi7uhvjyjhVKISfwjfOJmuy7kg4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +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.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -18,14 +18,14 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/jobs_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/jobs_client.go index 67e9f6150c39..0c3a3a0904d6 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/jobs_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/jobs_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,9 +46,9 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCreateOrUpdate - Create or Update a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. +// - jobName - Job Name // - jobEnvelope - Properties used to create a container apps job // - options - JobsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobsClient.BeginCreateOrUpdate // method. @@ -59,9 +58,10 @@ func (client *JobsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[JobsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -70,20 +70,22 @@ func (client *JobsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup // CreateOrUpdate - Create or Update a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *JobsClient) createOrUpdate(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope Job, options *JobsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, jobName, jobEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -106,18 +108,21 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, jobEnvelope) + if err := runtime.MarshalAsJSON(req, jobEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. +// - jobName - Job Name // - options - JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginDeleteOptions) (*runtime.Poller[JobsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { @@ -125,9 +130,10 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[JobsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -136,20 +142,22 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Delete a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *JobsClient) deleteOperation(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -172,7 +180,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,23 +189,26 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Get the properties of a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. +// - jobName - Job Name // - options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientGetOptions) (JobsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { return JobsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -220,7 +231,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -237,7 +248,7 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR // NewListByResourceGroupPager - Get the Container Apps Jobs in a given resource group. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - JobsClientListByResourceGroupOptions contains the optional parameters for the JobsClient.NewListByResourceGroupPager // method. @@ -285,7 +296,7 @@ func (client *JobsClient) listByResourceGroupCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +313,7 @@ func (client *JobsClient) listByResourceGroupHandleResponse(resp *http.Response) // NewListBySubscriptionPager - Get the Container Apps Jobs in a given subscription. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - options - JobsClientListBySubscriptionOptions contains the optional parameters for the JobsClient.NewListBySubscriptionPager // method. func (client *JobsClient) NewListBySubscriptionPager(options *JobsClientListBySubscriptionOptions) *runtime.Pager[JobsClientListBySubscriptionResponse] { @@ -345,7 +356,7 @@ func (client *JobsClient) listBySubscriptionCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -363,23 +374,26 @@ func (client *JobsClient) listBySubscriptionHandleResponse(resp *http.Response) // ListSecrets - List secrets for a container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. +// - jobName - Job Name // - options - JobsClientListSecretsOptions contains the optional parameters for the JobsClient.ListSecrets method. func (client *JobsClient) ListSecrets(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientListSecretsOptions) (JobsClientListSecretsResponse, error) { + var err error req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { return JobsClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobsClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobsClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobsClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. @@ -402,7 +416,7 @@ func (client *JobsClient) listSecretsCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -420,20 +434,20 @@ func (client *JobsClient) listSecretsHandleResponse(resp *http.Response) (JobsCl // BeginStart - Start a Container Apps Job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. -// - templateParam - Properties used to start a job instance. +// - jobName - Job Name // - options - JobsClientBeginStartOptions contains the optional parameters for the JobsClient.BeginStart method. -func (client *JobsClient) BeginStart(ctx context.Context, resourceGroupName string, jobName string, templateParam JobExecutionTemplate, options *JobsClientBeginStartOptions) (*runtime.Poller[JobsClientStartResponse], error) { +func (client *JobsClient) BeginStart(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStartOptions) (*runtime.Poller[JobsClientStartResponse], error) { if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, jobName, templateParam, options) + resp, err := client.start(ctx, resourceGroupName, jobName, options) if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientStartResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientStartResponse]{ FinalStateVia: runtime.FinalStateViaLocation, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[JobsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -442,24 +456,26 @@ func (client *JobsClient) BeginStart(ctx context.Context, resourceGroupName stri // Start - Start a Container Apps Job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview -func (client *JobsClient) start(ctx context.Context, resourceGroupName string, jobName string, templateParam JobExecutionTemplate, options *JobsClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, jobName, templateParam, options) +// Generated from API version 2023-05-01 +func (client *JobsClient) start(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStartOptions) (*http.Response, error) { + var err error + req, err := client.startCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startCreateRequest creates the Start request. -func (client *JobsClient) startCreateRequest(ctx context.Context, resourceGroupName string, jobName string, templateParam JobExecutionTemplate, options *JobsClientBeginStartOptions) (*policy.Request, error) { +func (client *JobsClient) startCreateRequest(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStartOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/start" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -478,18 +494,24 @@ func (client *JobsClient) startCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, templateParam) + if options != nil && options.Template != nil { + if err := runtime.MarshalAsJSON(req, *options.Template); err != nil { + return nil, err + } + return req, nil + } + return req, nil } // BeginStopExecution - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. +// - jobName - Job Name // - jobExecutionName - Job execution name. // - options - JobsClientBeginStopExecutionOptions contains the optional parameters for the JobsClient.BeginStopExecution method. func (client *JobsClient) BeginStopExecution(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, options *JobsClientBeginStopExecutionOptions) (*runtime.Poller[JobsClientStopExecutionResponse], error) { @@ -498,9 +520,10 @@ func (client *JobsClient) BeginStopExecution(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientStopExecutionResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientStopExecutionResponse]{ FinalStateVia: runtime.FinalStateViaLocation, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[JobsClientStopExecutionResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -509,20 +532,22 @@ func (client *JobsClient) BeginStopExecution(ctx context.Context, resourceGroupN // StopExecution - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *JobsClient) stopExecution(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, options *JobsClientBeginStopExecutionOptions) (*http.Response, error) { + var err error req, err := client.stopExecutionCreateRequest(ctx, resourceGroupName, jobName, jobExecutionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // stopExecutionCreateRequest creates the StopExecution request. @@ -549,7 +574,7 @@ func (client *JobsClient) stopExecutionCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -558,21 +583,21 @@ func (client *JobsClient) stopExecutionCreateRequest(ctx context.Context, resour // BeginStopMultipleExecutions - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. -// - jobExecutionName - List of all job executions that should be stopped. +// - jobName - Job Name // - options - JobsClientBeginStopMultipleExecutionsOptions contains the optional parameters for the JobsClient.BeginStopMultipleExecutions // method. -func (client *JobsClient) BeginStopMultipleExecutions(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName JobExecutionNamesCollection, options *JobsClientBeginStopMultipleExecutionsOptions) (*runtime.Poller[JobsClientStopMultipleExecutionsResponse], error) { +func (client *JobsClient) BeginStopMultipleExecutions(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStopMultipleExecutionsOptions) (*runtime.Poller[JobsClientStopMultipleExecutionsResponse], error) { if options == nil || options.ResumeToken == "" { - resp, err := client.stopMultipleExecutions(ctx, resourceGroupName, jobName, jobExecutionName, options) + resp, err := client.stopMultipleExecutions(ctx, resourceGroupName, jobName, options) if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientStopMultipleExecutionsResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobsClientStopMultipleExecutionsResponse]{ FinalStateVia: runtime.FinalStateViaLocation, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[JobsClientStopMultipleExecutionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -581,24 +606,26 @@ func (client *JobsClient) BeginStopMultipleExecutions(ctx context.Context, resou // StopMultipleExecutions - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview -func (client *JobsClient) stopMultipleExecutions(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName JobExecutionNamesCollection, options *JobsClientBeginStopMultipleExecutionsOptions) (*http.Response, error) { - req, err := client.stopMultipleExecutionsCreateRequest(ctx, resourceGroupName, jobName, jobExecutionName, options) +// Generated from API version 2023-05-01 +func (client *JobsClient) stopMultipleExecutions(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStopMultipleExecutionsOptions) (*http.Response, error) { + var err error + req, err := client.stopMultipleExecutionsCreateRequest(ctx, resourceGroupName, jobName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // stopMultipleExecutionsCreateRequest creates the StopMultipleExecutions request. -func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName JobExecutionNamesCollection, options *JobsClientBeginStopMultipleExecutionsOptions) (*policy.Request, error) { +func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStopMultipleExecutionsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -617,18 +644,18 @@ func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, jobExecutionName) + return req, nil } // BeginUpdate - Patches a Container Apps Job using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. +// - jobName - Job Name // - jobEnvelope - Properties used to create a container apps job // - options - JobsClientBeginUpdateOptions contains the optional parameters for the JobsClient.BeginUpdate method. func (client *JobsClient) BeginUpdate(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope JobPatchProperties, options *JobsClientBeginUpdateOptions) (*runtime.Poller[JobsClientUpdateResponse], error) { @@ -637,7 +664,8 @@ func (client *JobsClient) BeginUpdate(ctx context.Context, resourceGroupName str if err != nil { return nil, err } - return runtime.NewPoller[JobsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[JobsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[JobsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -646,20 +674,22 @@ func (client *JobsClient) BeginUpdate(ctx context.Context, resourceGroupName str // Update - Patches a Container Apps Job using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *JobsClient) update(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope JobPatchProperties, options *JobsClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, jobName, jobEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -682,8 +712,11 @@ func (client *JobsClient) updateCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, jobEnvelope) + if err := runtime.MarshalAsJSON(req, jobEnvelope); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/jobs_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/jobs_client_example_test.go index df60cb227c03..b8fa9e141d0b 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/jobs_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/jobs_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListBySubscription.json func ExampleJobsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -95,7 +95,7 @@ func ExampleJobsClient_NewListBySubscriptionPager() { // Parallelism: to.Ptr[int32](5), // ReplicaCompletionCount: to.Ptr[int32](1), // }, - // TriggerType: to.Ptr(armappcontainers.TriggerTypeScheduled), + // TriggerType: to.Ptr(armappcontainers.TriggerType("Scheduled")), // }, // EnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), // ProvisioningState: to.Ptr(armappcontainers.JobProvisioningStateSucceeded), @@ -125,7 +125,7 @@ func ExampleJobsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListByResourceGroup.json func ExampleJobsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -202,7 +202,7 @@ func ExampleJobsClient_NewListByResourceGroupPager() { // Parallelism: to.Ptr[int32](4), // ReplicaCompletionCount: to.Ptr[int32](1), // }, - // TriggerType: to.Ptr(armappcontainers.TriggerTypeScheduled), + // TriggerType: to.Ptr(armappcontainers.TriggerType("Scheduled")), // }, // EnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), // ProvisioningState: to.Ptr(armappcontainers.JobProvisioningStateSucceeded), @@ -232,7 +232,7 @@ func ExampleJobsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Get.json func ExampleJobsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -291,8 +291,8 @@ func ExampleJobsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json -func ExampleJobsClient_BeginCreateOrUpdate() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate.json +func ExampleJobsClient_BeginCreateOrUpdate_createOrUpdateContainerAppsJob() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -425,7 +425,137 @@ func ExampleJobsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate_EventTrigger.json +func ExampleJobsClient_BeginCreateOrUpdate_createOrUpdateContainerAppsJobWithEventDrivenTrigger() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armappcontainers.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewJobsClient().BeginCreateOrUpdate(ctx, "rg", "testcontainerAppsJob0", armappcontainers.Job{ + Location: to.Ptr("East US"), + Properties: &armappcontainers.JobProperties{ + Configuration: &armappcontainers.JobConfiguration{ + EventTriggerConfig: &armappcontainers.JobConfigurationEventTriggerConfig{ + Parallelism: to.Ptr[int32](4), + ReplicaCompletionCount: to.Ptr[int32](1), + Scale: &armappcontainers.JobScale{ + MaxExecutions: to.Ptr[int32](5), + MinExecutions: to.Ptr[int32](1), + PollingInterval: to.Ptr[int32](40), + Rules: []*armappcontainers.JobScaleRule{ + { + Name: to.Ptr("servicebuscalingrule"), + Type: to.Ptr("azure-servicebus"), + Metadata: map[string]any{ + "topicName": "my-topic", + }, + }}, + }, + }, + ReplicaRetryLimit: to.Ptr[int32](10), + ReplicaTimeout: to.Ptr[int32](10), + TriggerType: to.Ptr(armappcontainers.TriggerTypeEvent), + }, + EnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), + Template: &armappcontainers.JobTemplate{ + Containers: []*armappcontainers.Container{ + { + Name: to.Ptr("testcontainerAppsJob0"), + Image: to.Ptr("repo/testcontainerAppsJob0:v1"), + }}, + InitContainers: []*armappcontainers.InitContainer{ + { + Name: to.Ptr("testinitcontainerAppsJob0"), + Args: []*string{ + to.Ptr("-c"), + to.Ptr("while true; do echo hello; sleep 10;done")}, + Command: []*string{ + to.Ptr("/bin/sh")}, + Image: to.Ptr("repo/testcontainerAppsJob0:v4"), + Resources: &armappcontainers.ContainerResources{ + CPU: to.Ptr[float64](0.2), + Memory: to.Ptr("100Mi"), + }, + }}, + }, + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.Job = armappcontainers.Job{ + // Name: to.Ptr("testcontainerAppsJob0"), + // Type: to.Ptr("Microsoft.App/jobs"), + // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/testcontainerAppsJob0"), + // Location: to.Ptr("East US"), + // Properties: &armappcontainers.JobProperties{ + // Configuration: &armappcontainers.JobConfiguration{ + // EventTriggerConfig: &armappcontainers.JobConfigurationEventTriggerConfig{ + // Parallelism: to.Ptr[int32](4), + // ReplicaCompletionCount: to.Ptr[int32](1), + // Scale: &armappcontainers.JobScale{ + // MaxExecutions: to.Ptr[int32](5), + // MinExecutions: to.Ptr[int32](1), + // PollingInterval: to.Ptr[int32](20), + // Rules: []*armappcontainers.JobScaleRule{ + // { + // Name: to.Ptr("githubscalingrule"), + // Type: to.Ptr("github-runner"), + // Metadata: map[string]any{ + // "githubAPIURL": "https://api.github.com", + // }, + // }}, + // }, + // }, + // ReplicaRetryLimit: to.Ptr[int32](10), + // ReplicaTimeout: to.Ptr[int32](10), + // TriggerType: to.Ptr(armappcontainers.TriggerTypeEvent), + // }, + // EnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), + // EventStreamEndpoint: to.Ptr("testEndpoint"), + // ProvisioningState: to.Ptr(armappcontainers.JobProvisioningStateSucceeded), + // Template: &armappcontainers.JobTemplate{ + // Containers: []*armappcontainers.Container{ + // { + // Name: to.Ptr("testcontainerAppsJob0"), + // Image: to.Ptr("repo/testcontainerAppsJob0:v4"), + // Resources: &armappcontainers.ContainerResources{ + // CPU: to.Ptr[float64](0.2), + // Memory: to.Ptr("100Mi"), + // }, + // }}, + // InitContainers: []*armappcontainers.InitContainer{ + // { + // Name: to.Ptr("testinitcontainerAppsJob0"), + // Args: []*string{ + // to.Ptr("-c"), + // to.Ptr("while true; do echo hello; sleep 10;done")}, + // Command: []*string{ + // to.Ptr("/bin/sh")}, + // Image: to.Ptr("repo/testcontainerAppsJob0:v4"), + // Resources: &armappcontainers.ContainerResources{ + // CPU: to.Ptr[float64](0.2), + // Memory: to.Ptr("100Mi"), + // }, + // }}, + // }, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Delete.json func ExampleJobsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -446,7 +576,7 @@ func ExampleJobsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Patch.json func ExampleJobsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -557,7 +687,7 @@ func ExampleJobsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Start.json func ExampleJobsClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -568,7 +698,7 @@ func ExampleJobsClient_BeginStart() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewJobsClient().BeginStart(ctx, "rg", "testcontainerAppsJob0", armappcontainers.JobExecutionTemplate{ + poller, err := clientFactory.NewJobsClient().BeginStart(ctx, "rg", "testcontainerAppsJob0", &armappcontainers.JobsClientBeginStartOptions{Template: &armappcontainers.JobExecutionTemplate{ Containers: []*armappcontainers.JobExecutionContainer{ { Name: to.Ptr("testcontainerAppsJob0"), @@ -592,7 +722,8 @@ func ExampleJobsClient_BeginStart() { Memory: to.Ptr("100Mi"), }, }}, - }, nil) + }, + }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -609,7 +740,7 @@ func ExampleJobsClient_BeginStart() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Execution.json func ExampleJobsClient_BeginStopExecution() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -630,7 +761,7 @@ func ExampleJobsClient_BeginStopExecution() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Multiple.json func ExampleJobsClient_BeginStopMultipleExecutions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -641,18 +772,7 @@ func ExampleJobsClient_BeginStopMultipleExecutions() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewJobsClient().BeginStopMultipleExecutions(ctx, "rg", "testcontainerAppsJob0", armappcontainers.JobExecutionNamesCollection{ - Value: []*armappcontainers.JobExecutionBase{ - { - Name: to.Ptr("jobExecution-27944453"), - }, - { - Name: to.Ptr("jobExecution-27944452"), - }, - { - Name: to.Ptr("jobExecution-27944451"), - }}, - }, nil) + poller, err := clientFactory.NewJobsClient().BeginStopMultipleExecutions(ctx, "rg", "testcontainerAppsJob0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -686,7 +806,7 @@ func ExampleJobsClient_BeginStopMultipleExecutions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_ListSecrets.json func ExampleJobsClient_ListSecrets() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/jobsexecutions_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/jobsexecutions_client.go index 9c494a70087b..8a46b9b668c5 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/jobsexecutions_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/jobsexecutions_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -46,9 +45,9 @@ func NewJobsExecutionsClient(subscriptionID string, credential azcore.TokenCrede // NewListPager - Get a Container Apps Job's executions // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. -// - jobName - Name of the Container Apps Job. +// - jobName - Job Name // - options - JobsExecutionsClientListOptions contains the optional parameters for the JobsExecutionsClient.NewListPager method. func (client *JobsExecutionsClient) NewListPager(resourceGroupName string, jobName string, options *JobsExecutionsClientListOptions) *runtime.Pager[JobsExecutionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[JobsExecutionsClientListResponse]{ @@ -98,7 +97,7 @@ func (client *JobsExecutionsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/jobsexecutions_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/jobsexecutions_client_example_test.go index af06540633f3..e1974aac43d9 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/jobsexecutions_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/jobsexecutions_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Executions_Get.json func ExampleJobsExecutionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedcertificates_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedcertificates_client.go index b8aa740323b2..2c22e6c68aaa 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedcertificates_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedcertificates_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewManagedCertificatesClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Create or Update a Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -59,9 +58,10 @@ func (client *ManagedCertificatesClient) BeginCreateOrUpdate(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedCertificatesClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedCertificatesClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, }) + return poller, err } else { return runtime.NewPollerFromResumeToken[ManagedCertificatesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -70,20 +70,22 @@ func (client *ManagedCertificatesClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Create or Update a Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ManagedCertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, options *ManagedCertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, environmentName, managedCertificateName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -110,11 +112,14 @@ func (client *ManagedCertificatesClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.ManagedCertificateEnvelope != nil { - return req, runtime.MarshalAsJSON(req, *options.ManagedCertificateEnvelope) + if err := runtime.MarshalAsJSON(req, *options.ManagedCertificateEnvelope); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -122,23 +127,25 @@ func (client *ManagedCertificatesClient) createOrUpdateCreateRequest(ctx context // Delete - Deletes the specified Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. // - options - ManagedCertificatesClientDeleteOptions contains the optional parameters for the ManagedCertificatesClient.Delete // method. func (client *ManagedCertificatesClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, options *ManagedCertificatesClientDeleteOptions) (ManagedCertificatesClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, environmentName, managedCertificateName, options) if err != nil { return ManagedCertificatesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedCertificatesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ManagedCertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ManagedCertificatesClientDeleteResponse{}, err } return ManagedCertificatesClientDeleteResponse{}, nil } @@ -167,7 +174,7 @@ func (client *ManagedCertificatesClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -176,24 +183,27 @@ func (client *ManagedCertificatesClient) deleteCreateRequest(ctx context.Context // Get - Get the specified Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. // - options - ManagedCertificatesClientGetOptions contains the optional parameters for the ManagedCertificatesClient.Get method. func (client *ManagedCertificatesClient) Get(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, options *ManagedCertificatesClientGetOptions) (ManagedCertificatesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, environmentName, managedCertificateName, options) if err != nil { return ManagedCertificatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedCertificatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedCertificatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedCertificatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -220,7 +230,7 @@ func (client *ManagedCertificatesClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -237,7 +247,7 @@ func (client *ManagedCertificatesClient) getHandleResponse(resp *http.Response) // NewListPager - Get the Managed Certificates in a given managed environment. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedCertificatesClientListOptions contains the optional parameters for the ManagedCertificatesClient.NewListPager @@ -290,7 +300,7 @@ func (client *ManagedCertificatesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -308,7 +318,7 @@ func (client *ManagedCertificatesClient) listHandleResponse(resp *http.Response) // Update - Patches a managed certificate. Oly patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -316,18 +326,21 @@ func (client *ManagedCertificatesClient) listHandleResponse(resp *http.Response) // - options - ManagedCertificatesClientUpdateOptions contains the optional parameters for the ManagedCertificatesClient.Update // method. func (client *ManagedCertificatesClient) Update(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, managedCertificateEnvelope ManagedCertificatePatch, options *ManagedCertificatesClientUpdateOptions) (ManagedCertificatesClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, options) if err != nil { return ManagedCertificatesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedCertificatesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedCertificatesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedCertificatesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -354,10 +367,13 @@ func (client *ManagedCertificatesClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, managedCertificateEnvelope) + if err := runtime.MarshalAsJSON(req, managedCertificateEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedcertificates_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedcertificates_client_example_test.go index a83be1aae56e..e1c3e67a8ff4 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedcertificates_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedcertificates_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Get.json func ExampleManagedCertificatesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -48,7 +48,7 @@ func ExampleManagedCertificatesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_CreateOrUpdate.json func ExampleManagedCertificatesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -89,7 +89,7 @@ func ExampleManagedCertificatesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Delete.json func ExampleManagedCertificatesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -106,7 +106,7 @@ func ExampleManagedCertificatesClient_Delete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_Patch.json func ExampleManagedCertificatesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -141,7 +141,7 @@ func ExampleManagedCertificatesClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_ListByManagedEnvironment.json func ExampleManagedCertificatesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client.go index 0f8c79eb82a7..2ec4373addef 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,25 +46,28 @@ func NewManagedEnvironmentDiagnosticsClient(subscriptionID string, credential az // GetDetector - Get the diagnostics data for a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - detectorName - Name of the Managed Environment detector. // - options - ManagedEnvironmentDiagnosticsClientGetDetectorOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.GetDetector // method. func (client *ManagedEnvironmentDiagnosticsClient) GetDetector(ctx context.Context, resourceGroupName string, environmentName string, detectorName string, options *ManagedEnvironmentDiagnosticsClientGetDetectorOptions) (ManagedEnvironmentDiagnosticsClientGetDetectorResponse, error) { + var err error req, err := client.getDetectorCreateRequest(ctx, resourceGroupName, environmentName, detectorName, options) if err != nil { return ManagedEnvironmentDiagnosticsClientGetDetectorResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentDiagnosticsClientGetDetectorResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentDiagnosticsClientGetDetectorResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentDiagnosticsClientGetDetectorResponse{}, err } - return client.getDetectorHandleResponse(resp) + resp, err := client.getDetectorHandleResponse(httpResp) + return resp, err } // getDetectorCreateRequest creates the GetDetector request. @@ -92,7 +94,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) getDetectorCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -110,24 +112,27 @@ func (client *ManagedEnvironmentDiagnosticsClient) getDetectorHandleResponse(res // ListDetectors - Get the list of diagnostics for a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentDiagnosticsClientListDetectorsOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.ListDetectors // method. func (client *ManagedEnvironmentDiagnosticsClient) ListDetectors(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentDiagnosticsClientListDetectorsOptions) (ManagedEnvironmentDiagnosticsClientListDetectorsResponse, error) { + var err error req, err := client.listDetectorsCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return ManagedEnvironmentDiagnosticsClientListDetectorsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentDiagnosticsClientListDetectorsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentDiagnosticsClientListDetectorsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentDiagnosticsClientListDetectorsResponse{}, err } - return client.listDetectorsHandleResponse(resp) + resp, err := client.listDetectorsHandleResponse(httpResp) + return resp, err } // listDetectorsCreateRequest creates the ListDetectors request. @@ -150,7 +155,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) listDetectorsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client_example_test.go index 375d14d617a5..3552e5290adc 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentdiagnostics_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_List.json func ExampleManagedEnvironmentDiagnosticsClient_ListDetectors() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -62,7 +62,7 @@ func ExampleManagedEnvironmentDiagnosticsClient_ListDetectors() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_Get.json func ExampleManagedEnvironmentDiagnosticsClient_GetDetector() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client.go index e2f0719158b5..cc05f55a869a 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewManagedEnvironmentsClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Creates or updates a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - environmentEnvelope - Configuration details of the Environment. @@ -59,7 +58,8 @@ func (client *ManagedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller[ManagedEnvironmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ManagedEnvironmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ManagedEnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -68,20 +68,22 @@ func (client *ManagedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ManagedEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, environmentName, environmentEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -104,16 +106,19 @@ func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, environmentEnvelope) + if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Delete a Managed Environment if it does not have any container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginDelete @@ -124,7 +129,8 @@ func (client *ManagedEnvironmentsClient) BeginDelete(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[ManagedEnvironmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ManagedEnvironmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ManagedEnvironmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -133,20 +139,22 @@ func (client *ManagedEnvironmentsClient) BeginDelete(ctx context.Context, resour // Delete - Delete a Managed Environment if it does not have any container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ManagedEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -169,7 +177,7 @@ func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -178,23 +186,26 @@ func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context // Get - Get the properties of a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsClientGetOptions contains the optional parameters for the ManagedEnvironmentsClient.Get method. func (client *ManagedEnvironmentsClient) Get(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientGetOptions) (ManagedEnvironmentsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return ManagedEnvironmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -217,7 +228,7 @@ func (client *ManagedEnvironmentsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -235,24 +246,27 @@ func (client *ManagedEnvironmentsClient) getHandleResponse(resp *http.Response) // GetAuthToken - Checks if resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedEnvironmentsClientGetAuthTokenOptions contains the optional parameters for the ManagedEnvironmentsClient.GetAuthToken // method. func (client *ManagedEnvironmentsClient) GetAuthToken(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientGetAuthTokenOptions) (ManagedEnvironmentsClientGetAuthTokenResponse, error) { + var err error req, err := client.getAuthTokenCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return ManagedEnvironmentsClientGetAuthTokenResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentsClientGetAuthTokenResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsClientGetAuthTokenResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentsClientGetAuthTokenResponse{}, err } - return client.getAuthTokenHandleResponse(resp) + resp, err := client.getAuthTokenHandleResponse(httpResp) + return resp, err } // getAuthTokenCreateRequest creates the GetAuthToken request. @@ -275,7 +289,7 @@ func (client *ManagedEnvironmentsClient) getAuthTokenCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -292,7 +306,7 @@ func (client *ManagedEnvironmentsClient) getAuthTokenHandleResponse(resp *http.R // NewListByResourceGroupPager - Get all the Managed Environments in a resource group. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ManagedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListByResourceGroupPager // method. @@ -340,7 +354,7 @@ func (client *ManagedEnvironmentsClient) listByResourceGroupCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -357,7 +371,7 @@ func (client *ManagedEnvironmentsClient) listByResourceGroupHandleResponse(resp // NewListBySubscriptionPager - Get all Managed Environments for a subscription. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - options - ManagedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListBySubscriptionPager // method. func (client *ManagedEnvironmentsClient) NewListBySubscriptionPager(options *ManagedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ManagedEnvironmentsClientListBySubscriptionResponse] { @@ -400,7 +414,7 @@ func (client *ManagedEnvironmentsClient) listBySubscriptionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -417,7 +431,7 @@ func (client *ManagedEnvironmentsClient) listBySubscriptionHandleResponse(resp * // NewListWorkloadProfileStatesPager - Get all workload Profile States for a Managed Environment. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedEnvironmentsClientListWorkloadProfileStatesOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager @@ -470,7 +484,7 @@ func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -488,7 +502,7 @@ func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesHandleResponse // BeginUpdate - Patches a Managed Environment using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - environmentEnvelope - Configuration details of the Environment. @@ -500,7 +514,8 @@ func (client *ManagedEnvironmentsClient) BeginUpdate(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[ManagedEnvironmentsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ManagedEnvironmentsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ManagedEnvironmentsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -509,20 +524,22 @@ func (client *ManagedEnvironmentsClient) BeginUpdate(ctx context.Context, resour // Update - Patches a Managed Environment using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 func (client *ManagedEnvironmentsClient) update(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, environmentName, environmentEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -545,8 +562,11 @@ func (client *ManagedEnvironmentsClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, environmentEnvelope) + if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client_example_test.go index d8d471fbd1e9..b5608849279f 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironments_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListBySubscription.json func ExampleManagedEnvironmentsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -121,7 +121,7 @@ func ExampleManagedEnvironmentsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListByResourceGroup.json func ExampleManagedEnvironmentsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -224,7 +224,7 @@ func ExampleManagedEnvironmentsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json func ExampleManagedEnvironmentsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -266,6 +266,11 @@ func ExampleManagedEnvironmentsClient_Get() { // KedaConfiguration: &armappcontainers.KedaConfiguration{ // Version: to.Ptr("2.8.1"), // }, + // PeerAuthentication: &armappcontainers.ManagedEnvironmentPropertiesPeerAuthentication{ + // Mtls: &armappcontainers.Mtls{ + // Enabled: to.Ptr(true), + // }, + // }, // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("20.42.33.145"), // VnetConfiguration: &armappcontainers.VnetConfiguration{ @@ -299,7 +304,7 @@ func ExampleManagedEnvironmentsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate_createEnvironmentWithCustomInfrastructureResourceGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -419,7 +424,7 @@ func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate_createEnvironmentWithC // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CreateOrUpdate.json func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate_createEnvironments() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -445,6 +450,11 @@ func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate_createEnvironments() { DNSSuffix: to.Ptr("www.my-name.com"), }, DaprAIConnectionString: to.Ptr("InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/"), + PeerAuthentication: &armappcontainers.ManagedEnvironmentPropertiesPeerAuthentication{ + Mtls: &armappcontainers.Mtls{ + Enabled: to.Ptr(true), + }, + }, VnetConfiguration: &armappcontainers.VnetConfiguration{ InfrastructureSubnetID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1"), }, @@ -505,6 +515,11 @@ func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate_createEnvironments() { // DefaultDomain: to.Ptr("testcontainerenv.k4apps.io"), // EventStreamEndpoint: to.Ptr("testEndpoint"), // InfrastructureResourceGroup: to.Ptr("capp-svc-testcontainerenv-eastus"), + // PeerAuthentication: &armappcontainers.ManagedEnvironmentPropertiesPeerAuthentication{ + // Mtls: &armappcontainers.Mtls{ + // Enabled: to.Ptr(true), + // }, + // }, // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("1.2.3.4"), // VnetConfiguration: &armappcontainers.VnetConfiguration{ @@ -538,7 +553,7 @@ func ExampleManagedEnvironmentsClient_BeginCreateOrUpdate_createEnvironments() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Delete.json func ExampleManagedEnvironmentsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -559,7 +574,7 @@ func ExampleManagedEnvironmentsClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Patch.json func ExampleManagedEnvironmentsClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -635,7 +650,7 @@ func ExampleManagedEnvironmentsClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_GetAuthToken.json func ExampleManagedEnvironmentsClient_GetAuthToken() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -665,7 +680,7 @@ func ExampleManagedEnvironmentsClient_GetAuthToken() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json func ExampleManagedEnvironmentsClient_NewListWorkloadProfileStatesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client.go index 9d02ed18d614..8abed20fcdc9 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,24 +46,27 @@ func NewManagedEnvironmentsDiagnosticsClient(subscriptionID string, credential a // GetRoot - Get the properties of a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsDiagnosticsClientGetRootOptions contains the optional parameters for the ManagedEnvironmentsDiagnosticsClient.GetRoot // method. func (client *ManagedEnvironmentsDiagnosticsClient) GetRoot(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsDiagnosticsClientGetRootOptions) (ManagedEnvironmentsDiagnosticsClientGetRootResponse, error) { + var err error req, err := client.getRootCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return ManagedEnvironmentsDiagnosticsClientGetRootResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentsDiagnosticsClientGetRootResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsDiagnosticsClientGetRootResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentsDiagnosticsClientGetRootResponse{}, err } - return client.getRootHandleResponse(resp) + resp, err := client.getRootHandleResponse(httpResp) + return resp, err } // getRootCreateRequest creates the GetRoot request. @@ -87,7 +89,7 @@ func (client *ManagedEnvironmentsDiagnosticsClient) getRootCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client_example_test.go index a4a4f4e6c264..db98c13a6f27 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsdiagnostics_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json func ExampleManagedEnvironmentsDiagnosticsClient_GetRoot() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -59,6 +59,11 @@ func ExampleManagedEnvironmentsDiagnosticsClient_GetRoot() { // KedaConfiguration: &armappcontainers.KedaConfiguration{ // Version: to.Ptr("2.8.1"), // }, + // PeerAuthentication: &armappcontainers.ManagedEnvironmentPropertiesPeerAuthentication{ + // Mtls: &armappcontainers.Mtls{ + // Enabled: to.Ptr(true), + // }, + // }, // ProvisioningState: to.Ptr(armappcontainers.EnvironmentProvisioningStateSucceeded), // StaticIP: to.Ptr("20.42.33.145"), // VnetConfiguration: &armappcontainers.VnetConfiguration{ diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client.go index 1a376c3d1014..907c2aa3dd78 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,7 +46,7 @@ func NewManagedEnvironmentsStoragesClient(subscriptionID string, credential azco // CreateOrUpdate - Create or update storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -55,18 +54,21 @@ func NewManagedEnvironmentsStoragesClient(subscriptionID string, credential azco // - options - ManagedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.CreateOrUpdate // method. func (client *ManagedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, storageName string, storageEnvelope ManagedEnvironmentStorage, options *ManagedEnvironmentsStoragesClientCreateOrUpdateOptions) (ManagedEnvironmentsStoragesClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, environmentName, storageName, storageEnvelope, options) if err != nil { return ManagedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsStoragesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentsStoragesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,10 +95,13 @@ func (client *ManagedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, storageEnvelope) + if err := runtime.MarshalAsJSON(req, storageEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,23 +116,25 @@ func (client *ManagedEnvironmentsStoragesClient) createOrUpdateHandleResponse(re // Delete - Delete storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. // - options - ManagedEnvironmentsStoragesClientDeleteOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.Delete // method. func (client *ManagedEnvironmentsStoragesClient) Delete(ctx context.Context, resourceGroupName string, environmentName string, storageName string, options *ManagedEnvironmentsStoragesClientDeleteOptions) (ManagedEnvironmentsStoragesClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, environmentName, storageName, options) if err != nil { return ManagedEnvironmentsStoragesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentsStoragesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ManagedEnvironmentsStoragesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentsStoragesClientDeleteResponse{}, err } return ManagedEnvironmentsStoragesClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,25 +172,28 @@ func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context // Get - Get storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. // - options - ManagedEnvironmentsStoragesClientGetOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.Get // method. func (client *ManagedEnvironmentsStoragesClient) Get(ctx context.Context, resourceGroupName string, environmentName string, storageName string, options *ManagedEnvironmentsStoragesClientGetOptions) (ManagedEnvironmentsStoragesClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, environmentName, storageName, options) if err != nil { return ManagedEnvironmentsStoragesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentsStoragesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsStoragesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentsStoragesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -210,7 +220,7 @@ func (client *ManagedEnvironmentsStoragesClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,24 +238,27 @@ func (client *ManagedEnvironmentsStoragesClient) getHandleResponse(resp *http.Re // List - Get all storages for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsStoragesClientListOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.List // method. func (client *ManagedEnvironmentsStoragesClient) List(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsStoragesClientListOptions) (ManagedEnvironmentsStoragesClientListResponse, error) { + var err error req, err := client.listCreateRequest(ctx, resourceGroupName, environmentName, options) if err != nil { return ManagedEnvironmentsStoragesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedEnvironmentsStoragesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedEnvironmentsStoragesClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedEnvironmentsStoragesClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -268,7 +281,7 @@ func (client *ManagedEnvironmentsStoragesClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client_example_test.go index 9cec79f3159b..7d1ba05ba14e 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/managedenvironmentsstorages_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_List.json func ExampleManagedEnvironmentsStoragesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -53,7 +53,7 @@ func ExampleManagedEnvironmentsStoragesClient_List() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Get.json func ExampleManagedEnvironmentsStoragesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -85,7 +85,7 @@ func ExampleManagedEnvironmentsStoragesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json func ExampleManagedEnvironmentsStoragesClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,7 +126,7 @@ func ExampleManagedEnvironmentsStoragesClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Delete.json func ExampleManagedEnvironmentsStoragesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/models.go b/sdk/resourcemanager/appcontainers/armappcontainers/models.go index bf84ff3ea91f..67285813b76b 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/models.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/models.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -28,10 +27,10 @@ type AllowedPrincipals struct { // AppLogsConfiguration - Configuration of application logs type AppLogsConfiguration struct { - // Logs destination + // Logs destination, can be 'log-analytics', 'azure-monitor' or 'none' Destination *string - // Log Analytics configuration + // Log Analytics configuration, must only be provided when destination is configured as 'log-analytics' LogAnalyticsConfiguration *LogAnalyticsConfiguration } @@ -170,12 +169,6 @@ type AvailableWorkloadProfileProperties struct { MemoryGiB *int32 } -// AvailableWorkloadProfilesClientGetOptions contains the optional parameters for the AvailableWorkloadProfilesClient.NewGetPager -// method. -type AvailableWorkloadProfilesClientGetOptions struct { - // placeholder for future optional parameters -} - // AvailableWorkloadProfilesCollection - Collection of available workload profiles in the location. type AvailableWorkloadProfilesCollection struct { // REQUIRED; Collection of workload profiles. @@ -267,6 +260,9 @@ type AzureCredentials struct { // Client Secret. ClientSecret *string + // Kind of auth github does for deploying the template + Kind *string + // Subscription Id. SubscriptionID *string @@ -367,11 +363,6 @@ type BillingMeterProperties struct { MeterType *string } -// BillingMetersClientGetOptions contains the optional parameters for the BillingMetersClient.Get method. -type BillingMetersClientGetOptions struct { - // placeholder for future optional parameters -} - // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment type Certificate struct { // REQUIRED; The geo-location where the resource lives @@ -447,32 +438,6 @@ type CertificateProperties struct { Valid *bool } -// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. -type CertificatesClientCreateOrUpdateOptions struct { - // Certificate to be created or updated - CertificateEnvelope *Certificate -} - -// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. -type CertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. -type CertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. -type CertificatesClientListOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. -type CertificatesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // CheckNameAvailabilityRequest - The check availability request body. type CheckNameAvailabilityRequest struct { // The name of the resource for which availability needs to be checked. @@ -524,6 +489,9 @@ type Configuration struct { // Collection of secrets used by a Container app Secrets []*Secret + + // Container App to be a dev Container App Service + Service *Service } // ConnectedEnvironment - An environment for Kubernetes cluster specialized for web workloads by Azure App Service @@ -613,133 +581,6 @@ type ConnectedEnvironmentStoragesCollection struct { Value []*ConnectedEnvironmentStorage } -// ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.CreateOrUpdate -// method. -type ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions struct { - // Certificate to be created or updated - CertificateEnvelope *Certificate -} - -// ConnectedEnvironmentsCertificatesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Delete -// method. -type ConnectedEnvironmentsCertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsCertificatesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Get -// method. -type ConnectedEnvironmentsCertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsCertificatesClientListOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.NewListPager -// method. -type ConnectedEnvironmentsCertificatesClientListOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsCertificatesClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Update -// method. -type ConnectedEnvironmentsCertificatesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginCreateOrUpdate -// method. -type ConnectedEnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginDelete -// method. -type ConnectedEnvironmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectedEnvironmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ConnectedEnvironmentsClient.CheckNameAvailability -// method. -type ConnectedEnvironmentsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsClient.Get method. -type ConnectedEnvironmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListByResourceGroupPager -// method. -type ConnectedEnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListBySubscriptionPager -// method. -type ConnectedEnvironmentsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.Update method. -type ConnectedEnvironmentsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate -// method. -type ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Delete -// method. -type ConnectedEnvironmentsDaprComponentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Get -// method. -type ConnectedEnvironmentsDaprComponentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientListOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.NewListPager -// method. -type ConnectedEnvironmentsDaprComponentsClientListOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsDaprComponentsClientListSecretsOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.ListSecrets -// method. -type ConnectedEnvironmentsDaprComponentsClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.CreateOrUpdate -// method. -type ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsStoragesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Delete -// method. -type ConnectedEnvironmentsStoragesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsStoragesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Get -// method. -type ConnectedEnvironmentsStoragesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectedEnvironmentsStoragesClientListOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.List -// method. -type ConnectedEnvironmentsStoragesClientListOptions struct { - // placeholder for future optional parameters -} - // Container App container definition type Container struct { // Container start command arguments. @@ -987,182 +828,6 @@ type ContainerAppSecret struct { Value *string } -// ContainerAppsAuthConfigsClientCreateOrUpdateOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.CreateOrUpdate -// method. -type ContainerAppsAuthConfigsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsAuthConfigsClientDeleteOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.Delete -// method. -type ContainerAppsAuthConfigsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsAuthConfigsClientGetOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.Get method. -type ContainerAppsAuthConfigsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsAuthConfigsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.NewListByContainerAppPager -// method. -type ContainerAppsAuthConfigsClientListByContainerAppOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate -// method. -type ContainerAppsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete method. -type ContainerAppsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsClientBeginUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginUpdate method. -type ContainerAppsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsClientGetAuthTokenOptions contains the optional parameters for the ContainerAppsClient.GetAuthToken method. -type ContainerAppsClientGetAuthTokenOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. -type ContainerAppsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager -// method. -type ContainerAppsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager -// method. -type ContainerAppsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListCustomHostNameAnalysisOptions contains the optional parameters for the ContainerAppsClient.ListCustomHostNameAnalysis -// method. -type ContainerAppsClientListCustomHostNameAnalysisOptions struct { - // Custom hostname. - CustomHostname *string -} - -// ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets method. -type ContainerAppsClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientGetDetectorOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetDetector -// method. -type ContainerAppsDiagnosticsClientGetDetectorOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientGetRevisionOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRevision -// method. -type ContainerAppsDiagnosticsClientGetRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientGetRootOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRoot -// method. -type ContainerAppsDiagnosticsClientGetRootOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientListDetectorsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListDetectorsPager -// method. -type ContainerAppsDiagnosticsClientListDetectorsOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsDiagnosticsClientListRevisionsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListRevisionsPager -// method. -type ContainerAppsDiagnosticsClientListRevisionsOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// ContainerAppsRevisionReplicasClientGetReplicaOptions contains the optional parameters for the ContainerAppsRevisionReplicasClient.GetReplica -// method. -type ContainerAppsRevisionReplicasClientGetReplicaOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionReplicasClientListReplicasOptions contains the optional parameters for the ContainerAppsRevisionReplicasClient.ListReplicas -// method. -type ContainerAppsRevisionReplicasClientListReplicasOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision -// method. -type ContainerAppsRevisionsClientActivateRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision -// method. -type ContainerAppsRevisionsClientDeactivateRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision -// method. -type ContainerAppsRevisionsClientGetRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager -// method. -type ContainerAppsRevisionsClientListRevisionsOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision -// method. -type ContainerAppsRevisionsClientRestartRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsSourceControlsClient.BeginCreateOrUpdate -// method. -type ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsSourceControlsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsSourceControlsClient.BeginDelete -// method. -type ContainerAppsSourceControlsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsSourceControlsClientGetOptions contains the optional parameters for the ContainerAppsSourceControlsClient.Get -// method. -type ContainerAppsSourceControlsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsSourceControlsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsSourceControlsClient.NewListByContainerAppPager -// method. -type ContainerAppsSourceControlsClientListByContainerAppOptions struct { - // placeholder for future optional parameters -} - // ContainerResources - Container App container resource requirements. type ContainerResources struct { // Required CPU in cores, e.g. 0.5 @@ -1404,32 +1069,6 @@ type DaprComponentProperties struct { Version *string } -// DaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the DaprComponentsClient.CreateOrUpdate -// method. -type DaprComponentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// DaprComponentsClientDeleteOptions contains the optional parameters for the DaprComponentsClient.Delete method. -type DaprComponentsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DaprComponentsClientGetOptions contains the optional parameters for the DaprComponentsClient.Get method. -type DaprComponentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DaprComponentsClientListOptions contains the optional parameters for the DaprComponentsClient.NewListPager method. -type DaprComponentsClientListOptions struct { - // placeholder for future optional parameters -} - -// DaprComponentsClientListSecretsOptions contains the optional parameters for the DaprComponentsClient.ListSecrets method. -type DaprComponentsClientListSecretsOptions struct { - // placeholder for future optional parameters -} - // DaprComponentsCollection - Dapr Components ARM resource. type DaprComponentsCollection struct { // REQUIRED; Collection of resources. @@ -1808,6 +1447,9 @@ type GithubActionConfiguration struct { // Context path ContextPath *string + // One time Github PAT to configure github environment + GithubPersonalAccessToken *string + // Image name Image *string @@ -2036,6 +1678,9 @@ type JobConfiguration struct { // REQUIRED; Trigger type of the job TriggerType *TriggerType + // Trigger configuration of an event driven job. + EventTriggerConfig *JobConfigurationEventTriggerConfig + // Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set // to 1 by default ManualTriggerConfig *JobConfigurationManualTriggerConfig @@ -2054,6 +1699,18 @@ type JobConfiguration struct { Secrets []*Secret } +// JobConfigurationEventTriggerConfig - Trigger configuration of an event driven job. +type JobConfigurationEventTriggerConfig struct { + // Number of parallel replicas of a job that can run at a given time. + Parallelism *int32 + + // Minimum number of successful replica completions before overall job completion. + ReplicaCompletionCount *int32 + + // Scaling configurations for event driven jobs. + Scale *JobScale +} + // JobConfigurationManualTriggerConfig - Manual trigger configuration for a single execution job. Properties replicaCompletionCount // and parallelism would be set to 1 by default type JobConfigurationManualTriggerConfig struct { @@ -2077,9 +1734,9 @@ type JobConfigurationScheduleTriggerConfig struct { ReplicaCompletionCount *int32 } -// JobExecution - Container Apps Jobs execution. +// JobExecution - Container Apps Job execution. type JobExecution struct { - // Job execution start time. + // Job execution end time. EndTime *time.Time // Job execution Id. @@ -2198,6 +1855,36 @@ type JobProperties struct { ProvisioningState *JobProvisioningState } +// JobScale - Scaling configurations for event driven jobs. +type JobScale struct { + // Maximum number of job executions that are created for a trigger, default 100. + MaxExecutions *int32 + + // Minimum number of job executions that are created for a trigger, default 0 + MinExecutions *int32 + + // Interval to check each event source in seconds. Defaults to 30s + PollingInterval *int32 + + // Scaling rules. + Rules []*JobScaleRule +} + +// JobScaleRule - Scaling rule. +type JobScaleRule struct { + // Authentication secrets for the scale rule. + Auth []*ScaleRuleAuth + + // Metadata properties to describe the scale rule. + Metadata any + + // Scale Rule Name + Name *string + + // Type of the scale rule eg: azure-servicebus, redis etc. + Type *string +} + // JobSecretsCollection - Container Apps Job Secrets Collection ARM resource. type JobSecretsCollection struct { // REQUIRED; Collection of resources. @@ -2217,63 +1904,6 @@ type JobTemplate struct { Volumes []*Volume } -// JobsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobsClient.BeginCreateOrUpdate method. -type JobsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. -type JobsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JobsClientBeginStartOptions contains the optional parameters for the JobsClient.BeginStart method. -type JobsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JobsClientBeginStopExecutionOptions contains the optional parameters for the JobsClient.BeginStopExecution method. -type JobsClientBeginStopExecutionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JobsClientBeginStopMultipleExecutionsOptions contains the optional parameters for the JobsClient.BeginStopMultipleExecutions -// method. -type JobsClientBeginStopMultipleExecutionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JobsClientBeginUpdateOptions contains the optional parameters for the JobsClient.BeginUpdate method. -type JobsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. -type JobsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobsClientListByResourceGroupOptions contains the optional parameters for the JobsClient.NewListByResourceGroupPager method. -type JobsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// JobsClientListBySubscriptionOptions contains the optional parameters for the JobsClient.NewListBySubscriptionPager method. -type JobsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// JobsClientListSecretsOptions contains the optional parameters for the JobsClient.ListSecrets method. -type JobsClientListSecretsOptions struct { - // placeholder for future optional parameters -} - // JobsCollection - Container Apps Jobs collection ARM resource. type JobsCollection struct { // REQUIRED; Collection of resources. @@ -2283,12 +1913,6 @@ type JobsCollection struct { NextLink *string } -// JobsExecutionsClientListOptions contains the optional parameters for the JobsExecutionsClient.NewListPager method. -type JobsExecutionsClientListOptions struct { - // The filter to apply on the operation. - Filter *string -} - // JwtClaimChecks - The configuration settings of the checks that should be made while validating the JWT Claims. type JwtClaimChecks struct { // The list of the allowed client applications. @@ -2304,7 +1928,7 @@ type KedaConfiguration struct { Version *string } -// LogAnalyticsConfiguration - Log analytics configuration +// LogAnalyticsConfiguration - Log Analytics configuration, must only be provided when destination is configured as 'log-analytics' type LogAnalyticsConfiguration struct { // Log analytics customer id CustomerID *string @@ -2402,35 +2026,6 @@ type ManagedCertificateProperties struct { ValidationToken *string } -// ManagedCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedCertificatesClient.BeginCreateOrUpdate -// method. -type ManagedCertificatesClientBeginCreateOrUpdateOptions struct { - // Managed Certificate to be created or updated - ManagedCertificateEnvelope *ManagedCertificate - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedCertificatesClientDeleteOptions contains the optional parameters for the ManagedCertificatesClient.Delete method. -type ManagedCertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ManagedCertificatesClientGetOptions contains the optional parameters for the ManagedCertificatesClient.Get method. -type ManagedCertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedCertificatesClientListOptions contains the optional parameters for the ManagedCertificatesClient.NewListPager method. -type ManagedCertificatesClientListOptions struct { - // placeholder for future optional parameters -} - -// ManagedCertificatesClientUpdateOptions contains the optional parameters for the ManagedCertificatesClient.Update method. -type ManagedCertificatesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ManagedEnvironment - An environment for hosting container apps type ManagedEnvironment struct { // REQUIRED; The geo-location where the resource lives @@ -2458,18 +2053,6 @@ type ManagedEnvironment struct { Type *string } -// ManagedEnvironmentDiagnosticsClientGetDetectorOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.GetDetector -// method. -type ManagedEnvironmentDiagnosticsClientGetDetectorOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentDiagnosticsClientListDetectorsOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.ListDetectors -// method. -type ManagedEnvironmentDiagnosticsClientListDetectorsOptions struct { - // placeholder for future optional parameters -} - // ManagedEnvironmentProperties - Managed environment resource specific properties type ManagedEnvironmentProperties struct { // Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" @@ -2496,6 +2079,9 @@ type ManagedEnvironmentProperties struct { // The configuration of Keda component. KedaConfiguration *KedaConfiguration + // Peer authentication settings for the Managed Environment + PeerAuthentication *ManagedEnvironmentPropertiesPeerAuthentication + // Vnet configuration for the environment VnetConfiguration *VnetConfiguration @@ -2521,6 +2107,12 @@ type ManagedEnvironmentProperties struct { StaticIP *string } +// ManagedEnvironmentPropertiesPeerAuthentication - Peer authentication settings for the Managed Environment +type ManagedEnvironmentPropertiesPeerAuthentication struct { + // Mutual TLS authentication settings for the Managed Environment + Mtls *Mtls +} + // ManagedEnvironmentStorage - Storage resource for managedEnvironment. type ManagedEnvironmentStorage struct { // Storage properties @@ -2551,56 +2143,6 @@ type ManagedEnvironmentStoragesCollection struct { Value []*ManagedEnvironmentStorage } -// ManagedEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginCreateOrUpdate -// method. -type ManagedEnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginDelete -// method. -type ManagedEnvironmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedEnvironmentsClientBeginUpdateOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginUpdate -// method. -type ManagedEnvironmentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedEnvironmentsClientGetAuthTokenOptions contains the optional parameters for the ManagedEnvironmentsClient.GetAuthToken -// method. -type ManagedEnvironmentsClientGetAuthTokenOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentsClientGetOptions contains the optional parameters for the ManagedEnvironmentsClient.Get method. -type ManagedEnvironmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListByResourceGroupPager -// method. -type ManagedEnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListBySubscriptionPager -// method. -type ManagedEnvironmentsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentsClientListWorkloadProfileStatesOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager -// method. -type ManagedEnvironmentsClientListWorkloadProfileStatesOptions struct { - // placeholder for future optional parameters -} - // ManagedEnvironmentsCollection - Collection of Environments type ManagedEnvironmentsCollection struct { // REQUIRED; Collection of resources. @@ -2610,36 +2152,6 @@ type ManagedEnvironmentsCollection struct { NextLink *string } -// ManagedEnvironmentsDiagnosticsClientGetRootOptions contains the optional parameters for the ManagedEnvironmentsDiagnosticsClient.GetRoot -// method. -type ManagedEnvironmentsDiagnosticsClientGetRootOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.CreateOrUpdate -// method. -type ManagedEnvironmentsStoragesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentsStoragesClientDeleteOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.Delete -// method. -type ManagedEnvironmentsStoragesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentsStoragesClientGetOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.Get -// method. -type ManagedEnvironmentsStoragesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedEnvironmentsStoragesClientListOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.List -// method. -type ManagedEnvironmentsStoragesClientListOptions struct { - // placeholder for future optional parameters -} - // ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) type ManagedServiceIdentity struct { // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). @@ -2660,10 +2172,10 @@ type ManagedServiceIdentity struct { TenantID *string } -// NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability -// method. -type NamespacesClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters +// Mtls - Configuration properties for mutual TLS authentication +type Mtls struct { + // Boolean indicating whether the mutual TLS authentication is enabled + Enabled *bool } // Nonce - The configuration settings of the nonce used in the login flow. @@ -2753,11 +2265,6 @@ type OperationDisplay struct { Resource *string } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a // location type ProxyResource struct { @@ -2860,6 +2367,12 @@ type ReplicaContainer struct { // READ-ONLY; Log Stream endpoint LogStreamEndpoint *string + + // READ-ONLY; Current running state of the container + RunningState *ContainerAppContainerRunningState + + // READ-ONLY; The details of container current running state + RunningStateDetails *string } // ReplicaProperties - Replica resource specific properties @@ -2867,8 +2380,17 @@ type ReplicaProperties struct { // The containers collection under a replica. Containers []*ReplicaContainer + // The init containers collection under a replica. + InitContainers []*ReplicaContainer + // READ-ONLY; Timestamp describing when the pod was created by controller CreatedTime *time.Time + + // READ-ONLY; Current running state of the replica + RunningState *ContainerAppReplicaRunningState + + // READ-ONLY; The details of replica current running state + RunningStateDetails *string } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources @@ -2939,6 +2461,9 @@ type RevisionProperties struct { // READ-ONLY; Number of pods currently running for this revision Replicas *int32 + // READ-ONLY; Current running state of the revision + RunningState *RevisionRunningState + // READ-ONLY; Container App Revision Template with all possible settings and the defaults if user did not provide them. The // defaults are populated as they were at the creation time Template *Template @@ -2977,9 +2502,9 @@ type ScaleRule struct { TCP *TCPScaleRule } -// ScaleRuleAuth - Auth Secrets for Container App Scale Rule +// ScaleRuleAuth - Auth Secrets for Scale Rule type ScaleRuleAuth struct { - // Name of the Container App secret from which to pull the auth params. + // Name of the secret from which to pull the auth params. SecretRef *string // Trigger Parameter that uses the secret @@ -3016,6 +2541,21 @@ type SecretsCollection struct { Value []*ContainerAppSecret } +// Service - Container App to be a dev service +type Service struct { + // REQUIRED; Dev ContainerApp service type + Type *string +} + +// ServiceBind - Configuration to bind a ContainerApp to a dev ContainerApp Service +type ServiceBind struct { + // Name of the service bind + Name *string + + // Resource id of the target service + ServiceID *string +} + // SourceControl - Container App SourceControl. type SourceControl struct { // SourceControl resource specific properties @@ -3104,6 +2644,15 @@ type Template struct { // Scaling properties for the Container App. Scale *Scale + // List of container app services bound to the app + ServiceBinds []*ServiceBind + + // Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. + // The value zero indicates stop immediately via the kill signal (no opportunity + // to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected + // cleanup time for your process. Defaults to 30 seconds. + TerminationGracePeriodSeconds *int64 + // List of volume definitions for the Container App. Volumes []*Volume } @@ -3195,6 +2744,9 @@ type VnetConfiguration struct { // Volume definitions for the Container App. type Volume struct { + // Mount options used while mounting the AzureFile. Must be a comma-separated string. + MountOptions *string + // Volume name. Name *string @@ -3213,6 +2765,9 @@ type VolumeMount struct { // Path within the container at which the volume should be mounted.Must not contain ':'. MountPath *string + // Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + SubPath *string + // This must match the Name of a Volume. VolumeName *string } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/models_serde.go b/sdk/resourcemanager/appcontainers/armappcontainers/models_serde.go index 95a59eb1c5d2..6095530348da 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/models_serde.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/models_serde.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -664,6 +663,7 @@ func (a AzureCredentials) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "clientId", a.ClientID) populate(objectMap, "clientSecret", a.ClientSecret) + populate(objectMap, "kind", a.Kind) populate(objectMap, "subscriptionId", a.SubscriptionID) populate(objectMap, "tenantId", a.TenantID) return json.Marshal(objectMap) @@ -684,6 +684,9 @@ func (a *AzureCredentials) UnmarshalJSON(data []byte) error { case "clientSecret": err = unpopulate(val, "ClientSecret", &a.ClientSecret) delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) case "subscriptionId": err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) delete(rawMsg, key) @@ -1237,6 +1240,7 @@ func (c Configuration) MarshalJSON() ([]byte, error) { populate(objectMap, "maxInactiveRevisions", c.MaxInactiveRevisions) populate(objectMap, "registries", c.Registries) populate(objectMap, "secrets", c.Secrets) + populate(objectMap, "service", c.Service) return json.Marshal(objectMap) } @@ -1267,6 +1271,9 @@ func (c *Configuration) UnmarshalJSON(data []byte) error { case "secrets": err = unpopulate(val, "Secrets", &c.Secrets) delete(rawMsg, key) + case "service": + err = unpopulate(val, "Service", &c.Service) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", c, err) @@ -3694,6 +3701,7 @@ func (g GithubActionConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "azureCredentials", g.AzureCredentials) populate(objectMap, "contextPath", g.ContextPath) + populate(objectMap, "githubPersonalAccessToken", g.GithubPersonalAccessToken) populate(objectMap, "image", g.Image) populate(objectMap, "os", g.OS) populate(objectMap, "publishType", g.PublishType) @@ -3718,6 +3726,9 @@ func (g *GithubActionConfiguration) UnmarshalJSON(data []byte) error { case "contextPath": err = unpopulate(val, "ContextPath", &g.ContextPath) delete(rawMsg, key) + case "githubPersonalAccessToken": + err = unpopulate(val, "GithubPersonalAccessToken", &g.GithubPersonalAccessToken) + delete(rawMsg, key) case "image": err = unpopulate(val, "Image", &g.Image) delete(rawMsg, key) @@ -4212,6 +4223,7 @@ func (j *Job) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobConfiguration. func (j JobConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "eventTriggerConfig", j.EventTriggerConfig) populate(objectMap, "manualTriggerConfig", j.ManualTriggerConfig) populate(objectMap, "registries", j.Registries) populate(objectMap, "replicaRetryLimit", j.ReplicaRetryLimit) @@ -4231,6 +4243,9 @@ func (j *JobConfiguration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "eventTriggerConfig": + err = unpopulate(val, "EventTriggerConfig", &j.EventTriggerConfig) + delete(rawMsg, key) case "manualTriggerConfig": err = unpopulate(val, "ManualTriggerConfig", &j.ManualTriggerConfig) delete(rawMsg, key) @@ -4260,6 +4275,41 @@ func (j *JobConfiguration) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type JobConfigurationEventTriggerConfig. +func (j JobConfigurationEventTriggerConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "parallelism", j.Parallelism) + populate(objectMap, "replicaCompletionCount", j.ReplicaCompletionCount) + populate(objectMap, "scale", j.Scale) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfigurationEventTriggerConfig. +func (j *JobConfigurationEventTriggerConfig) 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", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "parallelism": + err = unpopulate(val, "Parallelism", &j.Parallelism) + delete(rawMsg, key) + case "replicaCompletionCount": + err = unpopulate(val, "ReplicaCompletionCount", &j.ReplicaCompletionCount) + delete(rawMsg, key) + case "scale": + err = unpopulate(val, "Scale", &j.Scale) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type JobConfigurationManualTriggerConfig. func (j JobConfigurationManualTriggerConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4642,6 +4692,84 @@ func (j *JobProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type JobScale. +func (j JobScale) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxExecutions", j.MaxExecutions) + populate(objectMap, "minExecutions", j.MinExecutions) + populate(objectMap, "pollingInterval", j.PollingInterval) + populate(objectMap, "rules", j.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobScale. +func (j *JobScale) 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", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxExecutions": + err = unpopulate(val, "MaxExecutions", &j.MaxExecutions) + delete(rawMsg, key) + case "minExecutions": + err = unpopulate(val, "MinExecutions", &j.MinExecutions) + delete(rawMsg, key) + case "pollingInterval": + err = unpopulate(val, "PollingInterval", &j.PollingInterval) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &j.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobScaleRule. +func (j JobScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", j.Auth) + populateAny(objectMap, "metadata", j.Metadata) + populate(objectMap, "name", j.Name) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobScaleRule. +func (j *JobScaleRule) 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", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &j.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &j.Metadata) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type JobSecretsCollection. func (j JobSecretsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5141,6 +5269,7 @@ func (m ManagedEnvironmentProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "eventStreamEndpoint", m.EventStreamEndpoint) populate(objectMap, "infrastructureResourceGroup", m.InfrastructureResourceGroup) populate(objectMap, "kedaConfiguration", m.KedaConfiguration) + populate(objectMap, "peerAuthentication", m.PeerAuthentication) populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "staticIp", m.StaticIP) populate(objectMap, "vnetConfiguration", m.VnetConfiguration) @@ -5188,6 +5317,9 @@ func (m *ManagedEnvironmentProperties) UnmarshalJSON(data []byte) error { case "kedaConfiguration": err = unpopulate(val, "KedaConfiguration", &m.KedaConfiguration) delete(rawMsg, key) + case "peerAuthentication": + err = unpopulate(val, "PeerAuthentication", &m.PeerAuthentication) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) delete(rawMsg, key) @@ -5211,6 +5343,33 @@ func (m *ManagedEnvironmentProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ManagedEnvironmentPropertiesPeerAuthentication. +func (m ManagedEnvironmentPropertiesPeerAuthentication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mtls", m.Mtls) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedEnvironmentPropertiesPeerAuthentication. +func (m *ManagedEnvironmentPropertiesPeerAuthentication) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mtls": + err = unpopulate(val, "Mtls", &m.Mtls) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ManagedEnvironmentStorage. func (m ManagedEnvironmentStorage) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5378,6 +5537,33 @@ func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Mtls. +func (m Mtls) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Mtls. +func (m *Mtls) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Nonce. func (n Nonce) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5854,6 +6040,8 @@ func (r ReplicaContainer) MarshalJSON() ([]byte, error) { populate(objectMap, "name", r.Name) populate(objectMap, "ready", r.Ready) populate(objectMap, "restartCount", r.RestartCount) + populate(objectMap, "runningState", r.RunningState) + populate(objectMap, "runningStateDetails", r.RunningStateDetails) populate(objectMap, "started", r.Started) return json.Marshal(objectMap) } @@ -5885,6 +6073,12 @@ func (r *ReplicaContainer) UnmarshalJSON(data []byte) error { case "restartCount": err = unpopulate(val, "RestartCount", &r.RestartCount) delete(rawMsg, key) + case "runningState": + err = unpopulate(val, "RunningState", &r.RunningState) + delete(rawMsg, key) + case "runningStateDetails": + err = unpopulate(val, "RunningStateDetails", &r.RunningStateDetails) + delete(rawMsg, key) case "started": err = unpopulate(val, "Started", &r.Started) delete(rawMsg, key) @@ -5901,6 +6095,9 @@ func (r ReplicaProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "containers", r.Containers) populateTimeRFC3339(objectMap, "createdTime", r.CreatedTime) + populate(objectMap, "initContainers", r.InitContainers) + populate(objectMap, "runningState", r.RunningState) + populate(objectMap, "runningStateDetails", r.RunningStateDetails) return json.Marshal(objectMap) } @@ -5919,6 +6116,15 @@ func (r *ReplicaProperties) UnmarshalJSON(data []byte) error { case "createdTime": err = unpopulateTimeRFC3339(val, "CreatedTime", &r.CreatedTime) delete(rawMsg, key) + case "initContainers": + err = unpopulate(val, "InitContainers", &r.InitContainers) + delete(rawMsg, key) + case "runningState": + err = unpopulate(val, "RunningState", &r.RunningState) + delete(rawMsg, key) + case "runningStateDetails": + err = unpopulate(val, "RunningStateDetails", &r.RunningStateDetails) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", r, err) @@ -6051,6 +6257,7 @@ func (r RevisionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningError", r.ProvisioningError) populate(objectMap, "provisioningState", r.ProvisioningState) populate(objectMap, "replicas", r.Replicas) + populate(objectMap, "runningState", r.RunningState) populate(objectMap, "template", r.Template) populate(objectMap, "trafficWeight", r.TrafficWeight) return json.Marshal(objectMap) @@ -6089,6 +6296,9 @@ func (r *RevisionProperties) UnmarshalJSON(data []byte) error { case "replicas": err = unpopulate(val, "Replicas", &r.Replicas) delete(rawMsg, key) + case "runningState": + err = unpopulate(val, "RunningState", &r.RunningState) + delete(rawMsg, key) case "template": err = unpopulate(val, "Template", &r.Template) delete(rawMsg, key) @@ -6309,6 +6519,64 @@ func (s *SecretsCollection) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Service. +func (s Service) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Service. +func (s *Service) 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 "type": + err = unpopulate(val, "Type", &s.Type) + 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 ServiceBind. +func (s ServiceBind) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "serviceId", s.ServiceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBind. +func (s *ServiceBind) 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 "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "serviceId": + err = unpopulate(val, "ServiceID", &s.ServiceID) + 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 SourceControl. func (s SourceControl) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6507,6 +6775,8 @@ func (t Template) MarshalJSON() ([]byte, error) { populate(objectMap, "initContainers", t.InitContainers) populate(objectMap, "revisionSuffix", t.RevisionSuffix) populate(objectMap, "scale", t.Scale) + populate(objectMap, "serviceBinds", t.ServiceBinds) + populate(objectMap, "terminationGracePeriodSeconds", t.TerminationGracePeriodSeconds) populate(objectMap, "volumes", t.Volumes) return json.Marshal(objectMap) } @@ -6532,6 +6802,12 @@ func (t *Template) UnmarshalJSON(data []byte) error { case "scale": err = unpopulate(val, "Scale", &t.Scale) delete(rawMsg, key) + case "serviceBinds": + err = unpopulate(val, "ServiceBinds", &t.ServiceBinds) + delete(rawMsg, key) + case "terminationGracePeriodSeconds": + err = unpopulate(val, "TerminationGracePeriodSeconds", &t.TerminationGracePeriodSeconds) + delete(rawMsg, key) case "volumes": err = unpopulate(val, "Volumes", &t.Volumes) delete(rawMsg, key) @@ -6768,6 +7044,7 @@ func (v *VnetConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Volume. func (v Volume) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "mountOptions", v.MountOptions) populate(objectMap, "name", v.Name) populate(objectMap, "secrets", v.Secrets) populate(objectMap, "storageName", v.StorageName) @@ -6784,6 +7061,9 @@ func (v *Volume) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "mountOptions": + err = unpopulate(val, "MountOptions", &v.MountOptions) + delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &v.Name) delete(rawMsg, key) @@ -6808,6 +7088,7 @@ func (v *Volume) UnmarshalJSON(data []byte) error { func (v VolumeMount) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "mountPath", v.MountPath) + populate(objectMap, "subPath", v.SubPath) populate(objectMap, "volumeName", v.VolumeName) return json.Marshal(objectMap) } @@ -6824,6 +7105,9 @@ func (v *VolumeMount) UnmarshalJSON(data []byte) error { case "mountPath": err = unpopulate(val, "MountPath", &v.MountPath) delete(rawMsg, key) + case "subPath": + err = unpopulate(val, "SubPath", &v.SubPath) + delete(rawMsg, key) case "volumeName": err = unpopulate(val, "VolumeName", &v.VolumeName) delete(rawMsg, key) diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client.go index d7db6999cd98..6f35d22cfa26 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -47,25 +46,28 @@ func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredentia // CheckNameAvailability - Checks if resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - checkNameAvailabilityRequest - The check name availability request. // - options - NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability // method. func (client *NamespacesClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, environmentName string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *NamespacesClientCheckNameAvailabilityOptions) (NamespacesClientCheckNameAvailabilityResponse, error) { + var err error req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, environmentName, checkNameAvailabilityRequest, options) if err != nil { return NamespacesClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NamespacesClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NamespacesClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NamespacesClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -88,10 +90,13 @@ func (client *NamespacesClient) checkNameAvailabilityCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkNameAvailabilityRequest) + if err := runtime.MarshalAsJSON(req, checkNameAvailabilityRequest); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client_example_test.go index 622c13300263..2ef125482d49 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/namespaces_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_CheckNameAvailability.json func ExampleNamespacesClient_CheckNameAvailability_certificatesCheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleNamespacesClient_CheckNameAvailability_certificatesCheckNameAvailabi // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CheckNameAvailability.json func ExampleNamespacesClient_CheckNameAvailability_containerAppsCheckNameAvailability() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/operations_client.go b/sdk/resourcemanager/appcontainers/armappcontainers/operations_client.go index 0fca3ccef2ce..041c13638a81 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/operations_client.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/operations_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers @@ -40,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available RP operations. // -// Generated from API version 2022-11-01-preview +// Generated from API version 2023-05-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]{ @@ -78,7 +77,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-11-01-preview") + reqQP.Set("api-version", "2023-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/operations_client_example_test.go b/sdk/resourcemanager/appcontainers/armappcontainers/operations_client_example_test.go index 49af50a75aef..7c888e1404ae 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/operations_client_example_test.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Operations_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/58be094c6b365f8d4d73a91e293dfb4818e57cf6/specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/options.go b/sdk/resourcemanager/appcontainers/armappcontainers/options.go new file mode 100644 index 000000000000..333f6051d3c1 --- /dev/null +++ b/sdk/resourcemanager/appcontainers/armappcontainers/options.go @@ -0,0 +1,592 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappcontainers + +// AvailableWorkloadProfilesClientGetOptions contains the optional parameters for the AvailableWorkloadProfilesClient.NewGetPager +// method. +type AvailableWorkloadProfilesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BillingMetersClientGetOptions contains the optional parameters for the BillingMetersClient.Get method. +type BillingMetersClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. +type CertificatesClientCreateOrUpdateOptions struct { + // Certificate to be created or updated + CertificateEnvelope *Certificate +} + +// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. +type CertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +type CertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. +type CertificatesClientListOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. +type CertificatesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.CreateOrUpdate +// method. +type ConnectedEnvironmentsCertificatesClientCreateOrUpdateOptions struct { + // Certificate to be created or updated + CertificateEnvelope *Certificate +} + +// ConnectedEnvironmentsCertificatesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Delete +// method. +type ConnectedEnvironmentsCertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsCertificatesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Get +// method. +type ConnectedEnvironmentsCertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsCertificatesClientListOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.NewListPager +// method. +type ConnectedEnvironmentsCertificatesClientListOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsCertificatesClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.Update +// method. +type ConnectedEnvironmentsCertificatesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginCreateOrUpdate +// method. +type ConnectedEnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginDelete +// method. +type ConnectedEnvironmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectedEnvironmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ConnectedEnvironmentsClient.CheckNameAvailability +// method. +type ConnectedEnvironmentsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsClient.Get method. +type ConnectedEnvironmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListByResourceGroupPager +// method. +type ConnectedEnvironmentsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListBySubscriptionPager +// method. +type ConnectedEnvironmentsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.Update method. +type ConnectedEnvironmentsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate +// method. +type ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsDaprComponentsClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Delete +// method. +type ConnectedEnvironmentsDaprComponentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsDaprComponentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.Get +// method. +type ConnectedEnvironmentsDaprComponentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsDaprComponentsClientListOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.NewListPager +// method. +type ConnectedEnvironmentsDaprComponentsClientListOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsDaprComponentsClientListSecretsOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.ListSecrets +// method. +type ConnectedEnvironmentsDaprComponentsClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.CreateOrUpdate +// method. +type ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsStoragesClientDeleteOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Delete +// method. +type ConnectedEnvironmentsStoragesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsStoragesClientGetOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.Get +// method. +type ConnectedEnvironmentsStoragesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectedEnvironmentsStoragesClientListOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.List +// method. +type ConnectedEnvironmentsStoragesClientListOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsAPIClientJobExecutionOptions contains the optional parameters for the ContainerAppsAPIClient.JobExecution +// method. +type ContainerAppsAPIClientJobExecutionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsAuthConfigsClientCreateOrUpdateOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.CreateOrUpdate +// method. +type ContainerAppsAuthConfigsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsAuthConfigsClientDeleteOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.Delete +// method. +type ContainerAppsAuthConfigsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsAuthConfigsClientGetOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.Get method. +type ContainerAppsAuthConfigsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsAuthConfigsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.NewListByContainerAppPager +// method. +type ContainerAppsAuthConfigsClientListByContainerAppOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate +// method. +type ContainerAppsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete method. +type ContainerAppsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientBeginStartOptions contains the optional parameters for the ContainerAppsClient.BeginStart method. +type ContainerAppsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientBeginStopOptions contains the optional parameters for the ContainerAppsClient.BeginStop method. +type ContainerAppsClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientBeginUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginUpdate method. +type ContainerAppsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientGetAuthTokenOptions contains the optional parameters for the ContainerAppsClient.GetAuthToken method. +type ContainerAppsClientGetAuthTokenOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. +type ContainerAppsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager +// method. +type ContainerAppsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager +// method. +type ContainerAppsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListCustomHostNameAnalysisOptions contains the optional parameters for the ContainerAppsClient.ListCustomHostNameAnalysis +// method. +type ContainerAppsClientListCustomHostNameAnalysisOptions struct { + // Custom hostname. + CustomHostname *string +} + +// ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets method. +type ContainerAppsClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsDiagnosticsClientGetDetectorOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetDetector +// method. +type ContainerAppsDiagnosticsClientGetDetectorOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsDiagnosticsClientGetRevisionOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRevision +// method. +type ContainerAppsDiagnosticsClientGetRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsDiagnosticsClientGetRootOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRoot +// method. +type ContainerAppsDiagnosticsClientGetRootOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsDiagnosticsClientListDetectorsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListDetectorsPager +// method. +type ContainerAppsDiagnosticsClientListDetectorsOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsDiagnosticsClientListRevisionsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListRevisionsPager +// method. +type ContainerAppsDiagnosticsClientListRevisionsOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// ContainerAppsRevisionReplicasClientGetReplicaOptions contains the optional parameters for the ContainerAppsRevisionReplicasClient.GetReplica +// method. +type ContainerAppsRevisionReplicasClientGetReplicaOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionReplicasClientListReplicasOptions contains the optional parameters for the ContainerAppsRevisionReplicasClient.ListReplicas +// method. +type ContainerAppsRevisionReplicasClientListReplicasOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision +// method. +type ContainerAppsRevisionsClientActivateRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision +// method. +type ContainerAppsRevisionsClientDeactivateRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision +// method. +type ContainerAppsRevisionsClientGetRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager +// method. +type ContainerAppsRevisionsClientListRevisionsOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision +// method. +type ContainerAppsRevisionsClientRestartRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsSourceControlsClient.BeginCreateOrUpdate +// method. +type ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsSourceControlsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsSourceControlsClient.BeginDelete +// method. +type ContainerAppsSourceControlsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsSourceControlsClientGetOptions contains the optional parameters for the ContainerAppsSourceControlsClient.Get +// method. +type ContainerAppsSourceControlsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsSourceControlsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsSourceControlsClient.NewListByContainerAppPager +// method. +type ContainerAppsSourceControlsClientListByContainerAppOptions struct { + // placeholder for future optional parameters +} + +// DaprComponentsClientCreateOrUpdateOptions contains the optional parameters for the DaprComponentsClient.CreateOrUpdate +// method. +type DaprComponentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DaprComponentsClientDeleteOptions contains the optional parameters for the DaprComponentsClient.Delete method. +type DaprComponentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DaprComponentsClientGetOptions contains the optional parameters for the DaprComponentsClient.Get method. +type DaprComponentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DaprComponentsClientListOptions contains the optional parameters for the DaprComponentsClient.NewListPager method. +type DaprComponentsClientListOptions struct { + // placeholder for future optional parameters +} + +// DaprComponentsClientListSecretsOptions contains the optional parameters for the DaprComponentsClient.ListSecrets method. +type DaprComponentsClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// JobsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobsClient.BeginCreateOrUpdate method. +type JobsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. +type JobsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientBeginStartOptions contains the optional parameters for the JobsClient.BeginStart method. +type JobsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + + // Properties used to start a job execution. + Template *JobExecutionTemplate +} + +// JobsClientBeginStopExecutionOptions contains the optional parameters for the JobsClient.BeginStopExecution method. +type JobsClientBeginStopExecutionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientBeginStopMultipleExecutionsOptions contains the optional parameters for the JobsClient.BeginStopMultipleExecutions +// method. +type JobsClientBeginStopMultipleExecutionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientBeginUpdateOptions contains the optional parameters for the JobsClient.BeginUpdate method. +type JobsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +type JobsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobsClientListByResourceGroupOptions contains the optional parameters for the JobsClient.NewListByResourceGroupPager method. +type JobsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// JobsClientListBySubscriptionOptions contains the optional parameters for the JobsClient.NewListBySubscriptionPager method. +type JobsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// JobsClientListSecretsOptions contains the optional parameters for the JobsClient.ListSecrets method. +type JobsClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// JobsExecutionsClientListOptions contains the optional parameters for the JobsExecutionsClient.NewListPager method. +type JobsExecutionsClientListOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// ManagedCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedCertificatesClient.BeginCreateOrUpdate +// method. +type ManagedCertificatesClientBeginCreateOrUpdateOptions struct { + // Managed Certificate to be created or updated + ManagedCertificateEnvelope *ManagedCertificate + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedCertificatesClientDeleteOptions contains the optional parameters for the ManagedCertificatesClient.Delete method. +type ManagedCertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagedCertificatesClientGetOptions contains the optional parameters for the ManagedCertificatesClient.Get method. +type ManagedCertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedCertificatesClientListOptions contains the optional parameters for the ManagedCertificatesClient.NewListPager method. +type ManagedCertificatesClientListOptions struct { + // placeholder for future optional parameters +} + +// ManagedCertificatesClientUpdateOptions contains the optional parameters for the ManagedCertificatesClient.Update method. +type ManagedCertificatesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentDiagnosticsClientGetDetectorOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.GetDetector +// method. +type ManagedEnvironmentDiagnosticsClientGetDetectorOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentDiagnosticsClientListDetectorsOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.ListDetectors +// method. +type ManagedEnvironmentDiagnosticsClientListDetectorsOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginCreateOrUpdate +// method. +type ManagedEnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginDelete +// method. +type ManagedEnvironmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedEnvironmentsClientBeginUpdateOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginUpdate +// method. +type ManagedEnvironmentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedEnvironmentsClientGetAuthTokenOptions contains the optional parameters for the ManagedEnvironmentsClient.GetAuthToken +// method. +type ManagedEnvironmentsClientGetAuthTokenOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsClientGetOptions contains the optional parameters for the ManagedEnvironmentsClient.Get method. +type ManagedEnvironmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListByResourceGroupPager +// method. +type ManagedEnvironmentsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListBySubscriptionPager +// method. +type ManagedEnvironmentsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsClientListWorkloadProfileStatesOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager +// method. +type ManagedEnvironmentsClientListWorkloadProfileStatesOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsDiagnosticsClientGetRootOptions contains the optional parameters for the ManagedEnvironmentsDiagnosticsClient.GetRoot +// method. +type ManagedEnvironmentsDiagnosticsClientGetRootOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsStoragesClientCreateOrUpdateOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.CreateOrUpdate +// method. +type ManagedEnvironmentsStoragesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsStoragesClientDeleteOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.Delete +// method. +type ManagedEnvironmentsStoragesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsStoragesClientGetOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.Get +// method. +type ManagedEnvironmentsStoragesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedEnvironmentsStoragesClientListOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.List +// method. +type ManagedEnvironmentsStoragesClientListOptions struct { + // placeholder for future optional parameters +} + +// NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability +// method. +type NamespacesClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/response_types.go b/sdk/resourcemanager/appcontainers/armappcontainers/response_types.go index c40847d25228..325e1dfe05c1 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/response_types.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/response_types.go @@ -3,24 +3,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers // AvailableWorkloadProfilesClientGetResponse contains the response from method AvailableWorkloadProfilesClient.NewGetPager. type AvailableWorkloadProfilesClientGetResponse struct { + // Collection of available workload profiles in the location. AvailableWorkloadProfilesCollection } // BillingMetersClientGetResponse contains the response from method BillingMetersClient.Get. type BillingMetersClientGetResponse struct { + // Collection of billing meters. BillingMeterCollection } // CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. type CertificatesClientCreateOrUpdateResponse struct { + // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment Certificate } @@ -31,21 +33,25 @@ type CertificatesClientDeleteResponse struct { // CertificatesClientGetResponse contains the response from method CertificatesClient.Get. type CertificatesClientGetResponse struct { + // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment Certificate } // CertificatesClientListResponse contains the response from method CertificatesClient.NewListPager. type CertificatesClientListResponse struct { + // Collection of Certificates. CertificateCollection } // CertificatesClientUpdateResponse contains the response from method CertificatesClient.Update. type CertificatesClientUpdateResponse struct { + // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment Certificate } // ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse contains the response from method ConnectedEnvironmentsCertificatesClient.CreateOrUpdate. type ConnectedEnvironmentsCertificatesClientCreateOrUpdateResponse struct { + // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment Certificate } @@ -56,26 +62,31 @@ type ConnectedEnvironmentsCertificatesClientDeleteResponse struct { // ConnectedEnvironmentsCertificatesClientGetResponse contains the response from method ConnectedEnvironmentsCertificatesClient.Get. type ConnectedEnvironmentsCertificatesClientGetResponse struct { + // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment Certificate } // ConnectedEnvironmentsCertificatesClientListResponse contains the response from method ConnectedEnvironmentsCertificatesClient.NewListPager. type ConnectedEnvironmentsCertificatesClientListResponse struct { + // Collection of Certificates. CertificateCollection } // ConnectedEnvironmentsCertificatesClientUpdateResponse contains the response from method ConnectedEnvironmentsCertificatesClient.Update. type ConnectedEnvironmentsCertificatesClientUpdateResponse struct { + // Certificate used for Custom Domain bindings of Container Apps in a Managed Environment Certificate } // ConnectedEnvironmentsClientCheckNameAvailabilityResponse contains the response from method ConnectedEnvironmentsClient.CheckNameAvailability. type ConnectedEnvironmentsClientCheckNameAvailabilityResponse struct { + // The check availability result. CheckNameAvailabilityResponse } // ConnectedEnvironmentsClientCreateOrUpdateResponse contains the response from method ConnectedEnvironmentsClient.BeginCreateOrUpdate. type ConnectedEnvironmentsClientCreateOrUpdateResponse struct { + // An environment for Kubernetes cluster specialized for web workloads by Azure App Service ConnectedEnvironment } @@ -86,26 +97,31 @@ type ConnectedEnvironmentsClientDeleteResponse struct { // ConnectedEnvironmentsClientGetResponse contains the response from method ConnectedEnvironmentsClient.Get. type ConnectedEnvironmentsClientGetResponse struct { + // An environment for Kubernetes cluster specialized for web workloads by Azure App Service ConnectedEnvironment } // ConnectedEnvironmentsClientListByResourceGroupResponse contains the response from method ConnectedEnvironmentsClient.NewListByResourceGroupPager. type ConnectedEnvironmentsClientListByResourceGroupResponse struct { + // Collection of connectedEnvironments ConnectedEnvironmentCollection } // ConnectedEnvironmentsClientListBySubscriptionResponse contains the response from method ConnectedEnvironmentsClient.NewListBySubscriptionPager. type ConnectedEnvironmentsClientListBySubscriptionResponse struct { + // Collection of connectedEnvironments ConnectedEnvironmentCollection } // ConnectedEnvironmentsClientUpdateResponse contains the response from method ConnectedEnvironmentsClient.Update. type ConnectedEnvironmentsClientUpdateResponse struct { + // An environment for Kubernetes cluster specialized for web workloads by Azure App Service ConnectedEnvironment } // ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.CreateOrUpdate. type ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateResponse struct { + // Dapr Component. DaprComponent } @@ -116,21 +132,25 @@ type ConnectedEnvironmentsDaprComponentsClientDeleteResponse struct { // ConnectedEnvironmentsDaprComponentsClientGetResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.Get. type ConnectedEnvironmentsDaprComponentsClientGetResponse struct { + // Dapr Component. DaprComponent } // ConnectedEnvironmentsDaprComponentsClientListResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.NewListPager. type ConnectedEnvironmentsDaprComponentsClientListResponse struct { + // Dapr Components ARM resource. DaprComponentsCollection } // ConnectedEnvironmentsDaprComponentsClientListSecretsResponse contains the response from method ConnectedEnvironmentsDaprComponentsClient.ListSecrets. type ConnectedEnvironmentsDaprComponentsClientListSecretsResponse struct { + // Dapr component Secrets Collection for ListSecrets Action. DaprSecretsCollection } // ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse contains the response from method ConnectedEnvironmentsStoragesClient.CreateOrUpdate. type ConnectedEnvironmentsStoragesClientCreateOrUpdateResponse struct { + // Storage resource for connectedEnvironment. ConnectedEnvironmentStorage } @@ -141,16 +161,25 @@ type ConnectedEnvironmentsStoragesClientDeleteResponse struct { // ConnectedEnvironmentsStoragesClientGetResponse contains the response from method ConnectedEnvironmentsStoragesClient.Get. type ConnectedEnvironmentsStoragesClientGetResponse struct { + // Storage resource for connectedEnvironment. ConnectedEnvironmentStorage } // ConnectedEnvironmentsStoragesClientListResponse contains the response from method ConnectedEnvironmentsStoragesClient.List. type ConnectedEnvironmentsStoragesClientListResponse struct { + // Collection of Storage for Environments ConnectedEnvironmentStoragesCollection } +// ContainerAppsAPIClientJobExecutionResponse contains the response from method ContainerAppsAPIClient.JobExecution. +type ContainerAppsAPIClientJobExecutionResponse struct { + // Container Apps Job execution. + JobExecution +} + // ContainerAppsAuthConfigsClientCreateOrUpdateResponse contains the response from method ContainerAppsAuthConfigsClient.CreateOrUpdate. type ContainerAppsAuthConfigsClientCreateOrUpdateResponse struct { + // Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. AuthConfig } @@ -161,16 +190,19 @@ type ContainerAppsAuthConfigsClientDeleteResponse struct { // ContainerAppsAuthConfigsClientGetResponse contains the response from method ContainerAppsAuthConfigsClient.Get. type ContainerAppsAuthConfigsClientGetResponse struct { + // Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. AuthConfig } // ContainerAppsAuthConfigsClientListByContainerAppResponse contains the response from method ContainerAppsAuthConfigsClient.NewListByContainerAppPager. type ContainerAppsAuthConfigsClientListByContainerAppResponse struct { + // AuthConfig collection ARM resource. AuthConfigCollection } // ContainerAppsClientCreateOrUpdateResponse contains the response from method ContainerAppsClient.BeginCreateOrUpdate. type ContainerAppsClientCreateOrUpdateResponse struct { + // Container App. ContainerApp } @@ -181,71 +213,97 @@ type ContainerAppsClientDeleteResponse struct { // ContainerAppsClientGetAuthTokenResponse contains the response from method ContainerAppsClient.GetAuthToken. type ContainerAppsClientGetAuthTokenResponse struct { + // Container App Auth Token. ContainerAppAuthToken } // ContainerAppsClientGetResponse contains the response from method ContainerAppsClient.Get. type ContainerAppsClientGetResponse struct { + // Container App. ContainerApp } // ContainerAppsClientListByResourceGroupResponse contains the response from method ContainerAppsClient.NewListByResourceGroupPager. type ContainerAppsClientListByResourceGroupResponse struct { + // Container App collection ARM resource. ContainerAppCollection } // ContainerAppsClientListBySubscriptionResponse contains the response from method ContainerAppsClient.NewListBySubscriptionPager. type ContainerAppsClientListBySubscriptionResponse struct { + // Container App collection ARM resource. ContainerAppCollection } // ContainerAppsClientListCustomHostNameAnalysisResponse contains the response from method ContainerAppsClient.ListCustomHostNameAnalysis. type ContainerAppsClientListCustomHostNameAnalysisResponse struct { + // Custom domain analysis. CustomHostnameAnalysisResult } // ContainerAppsClientListSecretsResponse contains the response from method ContainerAppsClient.ListSecrets. type ContainerAppsClientListSecretsResponse struct { + // Container App Secrets Collection ARM resource. SecretsCollection } +// ContainerAppsClientStartResponse contains the response from method ContainerAppsClient.BeginStart. +type ContainerAppsClientStartResponse struct { + // Container App. + ContainerApp +} + +// ContainerAppsClientStopResponse contains the response from method ContainerAppsClient.BeginStop. +type ContainerAppsClientStopResponse struct { + // Container App. + ContainerApp +} + // ContainerAppsClientUpdateResponse contains the response from method ContainerAppsClient.BeginUpdate. type ContainerAppsClientUpdateResponse struct { + // Container App. ContainerApp } // ContainerAppsDiagnosticsClientGetDetectorResponse contains the response from method ContainerAppsDiagnosticsClient.GetDetector. type ContainerAppsDiagnosticsClientGetDetectorResponse struct { + // Diagnostics data for a resource. Diagnostics } // ContainerAppsDiagnosticsClientGetRevisionResponse contains the response from method ContainerAppsDiagnosticsClient.GetRevision. type ContainerAppsDiagnosticsClientGetRevisionResponse struct { + // Container App Revision. Revision } // ContainerAppsDiagnosticsClientGetRootResponse contains the response from method ContainerAppsDiagnosticsClient.GetRoot. type ContainerAppsDiagnosticsClientGetRootResponse struct { + // Container App. ContainerApp } // ContainerAppsDiagnosticsClientListDetectorsResponse contains the response from method ContainerAppsDiagnosticsClient.NewListDetectorsPager. type ContainerAppsDiagnosticsClientListDetectorsResponse struct { + // Diagnostics data collection for a resource. DiagnosticsCollection } // ContainerAppsDiagnosticsClientListRevisionsResponse contains the response from method ContainerAppsDiagnosticsClient.NewListRevisionsPager. type ContainerAppsDiagnosticsClientListRevisionsResponse struct { + // Container App Revisions collection ARM resource. RevisionCollection } // ContainerAppsRevisionReplicasClientGetReplicaResponse contains the response from method ContainerAppsRevisionReplicasClient.GetReplica. type ContainerAppsRevisionReplicasClientGetReplicaResponse struct { + // Container App Revision Replica. Replica } // ContainerAppsRevisionReplicasClientListReplicasResponse contains the response from method ContainerAppsRevisionReplicasClient.ListReplicas. type ContainerAppsRevisionReplicasClientListReplicasResponse struct { + // Container App Revision Replicas collection ARM resource. ReplicaCollection } @@ -261,11 +319,13 @@ type ContainerAppsRevisionsClientDeactivateRevisionResponse struct { // ContainerAppsRevisionsClientGetRevisionResponse contains the response from method ContainerAppsRevisionsClient.GetRevision. type ContainerAppsRevisionsClientGetRevisionResponse struct { + // Container App Revision. Revision } // ContainerAppsRevisionsClientListRevisionsResponse contains the response from method ContainerAppsRevisionsClient.NewListRevisionsPager. type ContainerAppsRevisionsClientListRevisionsResponse struct { + // Container App Revisions collection ARM resource. RevisionCollection } @@ -276,6 +336,7 @@ type ContainerAppsRevisionsClientRestartRevisionResponse struct { // ContainerAppsSourceControlsClientCreateOrUpdateResponse contains the response from method ContainerAppsSourceControlsClient.BeginCreateOrUpdate. type ContainerAppsSourceControlsClientCreateOrUpdateResponse struct { + // Container App SourceControl. SourceControl } @@ -286,16 +347,19 @@ type ContainerAppsSourceControlsClientDeleteResponse struct { // ContainerAppsSourceControlsClientGetResponse contains the response from method ContainerAppsSourceControlsClient.Get. type ContainerAppsSourceControlsClientGetResponse struct { + // Container App SourceControl. SourceControl } // ContainerAppsSourceControlsClientListByContainerAppResponse contains the response from method ContainerAppsSourceControlsClient.NewListByContainerAppPager. type ContainerAppsSourceControlsClientListByContainerAppResponse struct { + // SourceControl collection ARM resource. SourceControlCollection } // DaprComponentsClientCreateOrUpdateResponse contains the response from method DaprComponentsClient.CreateOrUpdate. type DaprComponentsClientCreateOrUpdateResponse struct { + // Dapr Component. DaprComponent } @@ -306,21 +370,25 @@ type DaprComponentsClientDeleteResponse struct { // DaprComponentsClientGetResponse contains the response from method DaprComponentsClient.Get. type DaprComponentsClientGetResponse struct { + // Dapr Component. DaprComponent } // DaprComponentsClientListResponse contains the response from method DaprComponentsClient.NewListPager. type DaprComponentsClientListResponse struct { + // Dapr Components ARM resource. DaprComponentsCollection } // DaprComponentsClientListSecretsResponse contains the response from method DaprComponentsClient.ListSecrets. type DaprComponentsClientListSecretsResponse struct { + // Dapr component Secrets Collection for ListSecrets Action. DaprSecretsCollection } // JobsClientCreateOrUpdateResponse contains the response from method JobsClient.BeginCreateOrUpdate. type JobsClientCreateOrUpdateResponse struct { + // Container App Job Job } @@ -331,26 +399,31 @@ type JobsClientDeleteResponse struct { // JobsClientGetResponse contains the response from method JobsClient.Get. type JobsClientGetResponse struct { + // Container App Job Job } // JobsClientListByResourceGroupResponse contains the response from method JobsClient.NewListByResourceGroupPager. type JobsClientListByResourceGroupResponse struct { + // Container Apps Jobs collection ARM resource. JobsCollection } // JobsClientListBySubscriptionResponse contains the response from method JobsClient.NewListBySubscriptionPager. type JobsClientListBySubscriptionResponse struct { + // Container Apps Jobs collection ARM resource. JobsCollection } // JobsClientListSecretsResponse contains the response from method JobsClient.ListSecrets. type JobsClientListSecretsResponse struct { + // Container Apps Job Secrets Collection ARM resource. JobSecretsCollection } // JobsClientStartResponse contains the response from method JobsClient.BeginStart. type JobsClientStartResponse struct { + // Container App's Job execution name. JobExecutionBase } @@ -361,21 +434,25 @@ type JobsClientStopExecutionResponse struct { // JobsClientStopMultipleExecutionsResponse contains the response from method JobsClient.BeginStopMultipleExecutions. type JobsClientStopMultipleExecutionsResponse struct { + // Container App executions collection ARM resource. ContainerAppJobExecutions } // JobsClientUpdateResponse contains the response from method JobsClient.BeginUpdate. type JobsClientUpdateResponse struct { + // Container App Job Job } // JobsExecutionsClientListResponse contains the response from method JobsExecutionsClient.NewListPager. type JobsExecutionsClientListResponse struct { + // Container App executions collection ARM resource. ContainerAppJobExecutions } // ManagedCertificatesClientCreateOrUpdateResponse contains the response from method ManagedCertificatesClient.BeginCreateOrUpdate. type ManagedCertificatesClientCreateOrUpdateResponse struct { + // Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment ManagedCertificate } @@ -386,31 +463,37 @@ type ManagedCertificatesClientDeleteResponse struct { // ManagedCertificatesClientGetResponse contains the response from method ManagedCertificatesClient.Get. type ManagedCertificatesClientGetResponse struct { + // Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment ManagedCertificate } // ManagedCertificatesClientListResponse contains the response from method ManagedCertificatesClient.NewListPager. type ManagedCertificatesClientListResponse struct { + // Collection of Managed Certificates. ManagedCertificateCollection } // ManagedCertificatesClientUpdateResponse contains the response from method ManagedCertificatesClient.Update. type ManagedCertificatesClientUpdateResponse struct { + // Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment ManagedCertificate } // ManagedEnvironmentDiagnosticsClientGetDetectorResponse contains the response from method ManagedEnvironmentDiagnosticsClient.GetDetector. type ManagedEnvironmentDiagnosticsClientGetDetectorResponse struct { + // Diagnostics data for a resource. Diagnostics } // ManagedEnvironmentDiagnosticsClientListDetectorsResponse contains the response from method ManagedEnvironmentDiagnosticsClient.ListDetectors. type ManagedEnvironmentDiagnosticsClientListDetectorsResponse struct { + // Diagnostics data collection for a resource. DiagnosticsCollection } // ManagedEnvironmentsClientCreateOrUpdateResponse contains the response from method ManagedEnvironmentsClient.BeginCreateOrUpdate. type ManagedEnvironmentsClientCreateOrUpdateResponse struct { + // An environment for hosting container apps ManagedEnvironment } @@ -421,41 +504,49 @@ type ManagedEnvironmentsClientDeleteResponse struct { // ManagedEnvironmentsClientGetAuthTokenResponse contains the response from method ManagedEnvironmentsClient.GetAuthToken. type ManagedEnvironmentsClientGetAuthTokenResponse struct { + // Environment Auth Token. EnvironmentAuthToken } // ManagedEnvironmentsClientGetResponse contains the response from method ManagedEnvironmentsClient.Get. type ManagedEnvironmentsClientGetResponse struct { + // An environment for hosting container apps ManagedEnvironment } // ManagedEnvironmentsClientListByResourceGroupResponse contains the response from method ManagedEnvironmentsClient.NewListByResourceGroupPager. type ManagedEnvironmentsClientListByResourceGroupResponse struct { + // Collection of Environments ManagedEnvironmentsCollection } // ManagedEnvironmentsClientListBySubscriptionResponse contains the response from method ManagedEnvironmentsClient.NewListBySubscriptionPager. type ManagedEnvironmentsClientListBySubscriptionResponse struct { + // Collection of Environments ManagedEnvironmentsCollection } // ManagedEnvironmentsClientListWorkloadProfileStatesResponse contains the response from method ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager. type ManagedEnvironmentsClientListWorkloadProfileStatesResponse struct { + // Collection of workloadProfileStates WorkloadProfileStatesCollection } // ManagedEnvironmentsClientUpdateResponse contains the response from method ManagedEnvironmentsClient.BeginUpdate. type ManagedEnvironmentsClientUpdateResponse struct { + // An environment for hosting container apps ManagedEnvironment } // ManagedEnvironmentsDiagnosticsClientGetRootResponse contains the response from method ManagedEnvironmentsDiagnosticsClient.GetRoot. type ManagedEnvironmentsDiagnosticsClientGetRootResponse struct { + // An environment for hosting container apps ManagedEnvironment } // ManagedEnvironmentsStoragesClientCreateOrUpdateResponse contains the response from method ManagedEnvironmentsStoragesClient.CreateOrUpdate. type ManagedEnvironmentsStoragesClientCreateOrUpdateResponse struct { + // Storage resource for managedEnvironment. ManagedEnvironmentStorage } @@ -466,20 +557,24 @@ type ManagedEnvironmentsStoragesClientDeleteResponse struct { // ManagedEnvironmentsStoragesClientGetResponse contains the response from method ManagedEnvironmentsStoragesClient.Get. type ManagedEnvironmentsStoragesClientGetResponse struct { + // Storage resource for managedEnvironment. ManagedEnvironmentStorage } // ManagedEnvironmentsStoragesClientListResponse contains the response from method ManagedEnvironmentsStoragesClient.List. type ManagedEnvironmentsStoragesClientListResponse struct { + // Collection of Storage for Environments ManagedEnvironmentStoragesCollection } // NamespacesClientCheckNameAvailabilityResponse contains the response from method NamespacesClient.CheckNameAvailability. type NamespacesClientCheckNameAvailabilityResponse struct { + // The check availability result. CheckNameAvailabilityResponse } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Available operations of the service AvailableOperations } diff --git a/sdk/resourcemanager/appcontainers/armappcontainers/time_rfc3339.go b/sdk/resourcemanager/appcontainers/armappcontainers/time_rfc3339.go index 2073cd115114..020221fe2d81 100644 --- a/sdk/resourcemanager/appcontainers/armappcontainers/time_rfc3339.go +++ b/sdk/resourcemanager/appcontainers/armappcontainers/time_rfc3339.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappcontainers