You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// // Copyright (c) Microsoft. All rights reserved.// // Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.// You may obtain a copy of the License at// http://www.apache.org/licenses/LICENSE-2.0// // Unless required by applicable law or agreed to in writing, software// distributed under the License is distributed on an "AS IS" BASIS,// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.// See the License for the specific language governing permissions and// limitations under the License.namespaceMicrosoft.Azure.Commands.ApiManagement.ServiceManagement.Commands{usingMicrosoft.Azure.Commands.ApiManagement.ServiceManagement.Models;usingSystem;usingSystem.Management.Automation;[Cmdlet(VerbsCommon.Add,Constants.ApiManagementApiToProduct)][OutputType(typeof(bool))]publicclassAddAzureApiManagementApiToProduct:AzureApiManagementCmdletBase{[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=true,HelpMessage="Instance of PsApiManagementContext. This parameter is required.")][ValidateNotNullOrEmpty]publicPsApiManagementContextContext{get;set;}[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=true,HelpMessage="Identifier of existing Product to add API to. This parameter is required.")][ValidateNotNullOrEmpty]publicStringProductId{get;set;}[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=true,HelpMessage="Identifier of existing APIs to be added to the product. This parameter is required.")][ValidateNotNullOrEmpty]publicStringApiId{get;set;}[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=false,HelpMessage="If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")]publicSwitchParameterPassThru{get;set;}publicoverridevoidExecuteApiManagementCmdlet(){Client.ApiAddToProduct(Context,ProductId,ApiId);if(PassThru){WriteObject(true);}}}}
1
+
//
2
+
// Copyright (c) Microsoft. All rights reserved.
3
+
//
4
+
// Licensed under the Apache License, Version 2.0 (the "License");
5
+
// you may not use this file except in compliance with the License.
6
+
// You may obtain a copy of the License at
7
+
// http://www.apache.org/licenses/LICENSE-2.0
8
+
//
9
+
// Unless required by applicable law or agreed to in writing, software
10
+
// distributed under the License is distributed on an "AS IS" BASIS,
11
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+
// See the License for the specific language governing permissions and
0 commit comments