-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 10.1.0
- Loading branch information
Showing
145 changed files
with
6,204 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
Apmcontrolplane/Cmdlets/Get-OCIApmcontrolplaneApmDomain.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* NOTE: Generated using OracleSDKGenerator, API Version: 20200630 | ||
* DO NOT EDIT this file manually. | ||
* | ||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
using System; | ||
using System.Management.Automation; | ||
using Oci.ApmcontrolplaneService.Requests; | ||
using Oci.ApmcontrolplaneService.Responses; | ||
using Oci.ApmcontrolplaneService.Models; | ||
using Oci.Common.Waiters; | ||
|
||
namespace Oci.ApmcontrolplaneService.Cmdlets | ||
{ | ||
[Cmdlet("Get", "OCIApmcontrolplaneApmDomain", DefaultParameterSetName = Default)] | ||
[OutputType(new System.Type[] { typeof(Oci.ApmcontrolplaneService.Models.ApmDomain), typeof(Oci.ApmcontrolplaneService.Responses.GetApmDomainResponse) })] | ||
public class GetOCIApmcontrolplaneApmDomain : OCIApmDomainCmdlet | ||
{ | ||
|
||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"OCID of the APM Domain", ParameterSetName = LifecycleStateParamSet)] | ||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"OCID of the APM Domain", ParameterSetName = Default)] | ||
public string ApmDomainId { get; set; } | ||
|
||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The client request ID for tracing.", ParameterSetName = LifecycleStateParamSet)] | ||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The client request ID for tracing.", ParameterSetName = Default)] | ||
public string OpcRequestId { get; set; } | ||
|
||
[Parameter(Mandatory = true, HelpMessage = @"This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state.", ParameterSetName = LifecycleStateParamSet)] | ||
public Oci.ApmcontrolplaneService.Models.LifecycleStates[] WaitForLifecycleState { get; set; } | ||
|
||
[Parameter(Mandatory = false, HelpMessage = @"Check every WaitIntervalSeconds to see whether the resource has reached a desired state.", ParameterSetName = LifecycleStateParamSet)] | ||
public int WaitIntervalSeconds { get; set; } = WAIT_INTERVAL_SECONDS; | ||
|
||
[Parameter(Mandatory = false, HelpMessage = @"Maximum number of attempts to be made until the resource reaches a desired state.", ParameterSetName = LifecycleStateParamSet)] | ||
public int MaxWaitAttempts { get; set; } = MAX_WAITER_ATTEMPTS; | ||
|
||
protected override void ProcessRecord() | ||
{ | ||
base.ProcessRecord(); | ||
GetApmDomainRequest request; | ||
|
||
try | ||
{ | ||
request = new GetApmDomainRequest | ||
{ | ||
ApmDomainId = ApmDomainId, | ||
OpcRequestId = OpcRequestId | ||
}; | ||
|
||
HandleOutput(request); | ||
FinishProcessing(response); | ||
} | ||
catch (Exception ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
} | ||
|
||
protected override void StopProcessing() | ||
{ | ||
base.StopProcessing(); | ||
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted")); | ||
} | ||
|
||
private void HandleOutput(GetApmDomainRequest request) | ||
{ | ||
var waiterConfig = new WaiterConfiguration | ||
{ | ||
MaxAttempts = MaxWaitAttempts, | ||
GetNextDelayInSeconds = (_) => WaitIntervalSeconds | ||
}; | ||
|
||
switch (ParameterSetName) | ||
{ | ||
case LifecycleStateParamSet: | ||
response = client.Waiters.ForApmDomain(request, waiterConfig, WaitForLifecycleState).Execute(); | ||
break; | ||
|
||
case Default: | ||
response = client.GetApmDomain(request).GetAwaiter().GetResult(); | ||
break; | ||
} | ||
WriteOutput(response, response.ApmDomain); | ||
} | ||
|
||
private GetApmDomainResponse response; | ||
private const string LifecycleStateParamSet = "LifecycleStateParamSet"; | ||
private const string Default = "Default"; | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
Apmcontrolplane/Cmdlets/Get-OCIApmcontrolplaneApmDomainWorkRequestsList.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* NOTE: Generated using OracleSDKGenerator, API Version: 20200630 | ||
* DO NOT EDIT this file manually. | ||
* | ||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
using System; | ||
using System.Management.Automation; | ||
using Oci.ApmcontrolplaneService.Requests; | ||
using Oci.ApmcontrolplaneService.Responses; | ||
using Oci.ApmcontrolplaneService.Models; | ||
|
||
namespace Oci.ApmcontrolplaneService.Cmdlets | ||
{ | ||
[Cmdlet("Get", "OCIApmcontrolplaneApmDomainWorkRequestsList")] | ||
[OutputType(new System.Type[] { typeof(Oci.ApmcontrolplaneService.Models.WorkRequest), typeof(Oci.ApmcontrolplaneService.Responses.ListApmDomainWorkRequestsResponse) })] | ||
public class GetOCIApmcontrolplaneApmDomainWorkRequestsList : OCIApmDomainCmdlet | ||
{ | ||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"OCID of the APM Domain")] | ||
public string ApmDomainId { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The client request ID for tracing.")] | ||
public string OpcRequestId { get; set; } | ||
|
||
protected override void ProcessRecord() | ||
{ | ||
base.ProcessRecord(); | ||
ListApmDomainWorkRequestsRequest request; | ||
|
||
try | ||
{ | ||
request = new ListApmDomainWorkRequestsRequest | ||
{ | ||
ApmDomainId = ApmDomainId, | ||
OpcRequestId = OpcRequestId | ||
}; | ||
|
||
response = client.ListApmDomainWorkRequests(request).GetAwaiter().GetResult(); | ||
WriteOutput(response, response.Items, true); | ||
FinishProcessing(response); | ||
} | ||
catch (Exception ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
} | ||
|
||
protected override void StopProcessing() | ||
{ | ||
base.StopProcessing(); | ||
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted")); | ||
} | ||
|
||
private ListApmDomainWorkRequestsResponse response; | ||
} | ||
} |
107 changes: 107 additions & 0 deletions
107
Apmcontrolplane/Cmdlets/Get-OCIApmcontrolplaneApmDomainsList.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* | ||
* NOTE: Generated using OracleSDKGenerator, API Version: 20200630 | ||
* DO NOT EDIT this file manually. | ||
* | ||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Management.Automation; | ||
using Oci.ApmcontrolplaneService.Requests; | ||
using Oci.ApmcontrolplaneService.Responses; | ||
using Oci.ApmcontrolplaneService.Models; | ||
|
||
namespace Oci.ApmcontrolplaneService.Cmdlets | ||
{ | ||
[Cmdlet("Get", "OCIApmcontrolplaneApmDomainsList")] | ||
[OutputType(new System.Type[] { typeof(Oci.ApmcontrolplaneService.Models.ApmDomainSummary), typeof(Oci.ApmcontrolplaneService.Responses.ListApmDomainsResponse) })] | ||
public class GetOCIApmcontrolplaneApmDomainsList : OCIApmDomainCmdlet | ||
{ | ||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The ID of the compartment in which to list resources.")] | ||
public string CompartmentId { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to return only resources that match the entire display name given.")] | ||
public string DisplayName { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to return only resources that match the given life-cycle state.")] | ||
public System.Nullable<Oci.ApmcontrolplaneService.Models.LifecycleStates> LifecycleState { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The maximum number of items to return.", ParameterSetName = LimitSet)] | ||
public System.Nullable<int> Limit { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.")] | ||
public string Page { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The sort order to use, either 'asc' or 'desc'.")] | ||
public System.Nullable<Oci.ApmcontrolplaneService.Models.SortOrders> SortOrder { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default.")] | ||
public System.Nullable<Oci.ApmcontrolplaneService.Requests.ListApmDomainsRequest.SortByEnum> SortBy { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The client request ID for tracing.")] | ||
public string OpcRequestId { get; set; } | ||
|
||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"Fetches all pages of results.", ParameterSetName = AllPageSet)] | ||
public SwitchParameter All { get; set; } | ||
|
||
protected override void ProcessRecord() | ||
{ | ||
base.ProcessRecord(); | ||
ListApmDomainsRequest request; | ||
|
||
try | ||
{ | ||
request = new ListApmDomainsRequest | ||
{ | ||
CompartmentId = CompartmentId, | ||
DisplayName = DisplayName, | ||
LifecycleState = LifecycleState, | ||
Limit = Limit, | ||
Page = Page, | ||
SortOrder = SortOrder, | ||
SortBy = SortBy, | ||
OpcRequestId = OpcRequestId | ||
}; | ||
IEnumerable<ListApmDomainsResponse> responses = GetRequestDelegate().Invoke(request); | ||
foreach (var item in responses) | ||
{ | ||
response = item; | ||
WriteOutput(response, response.Items, true); | ||
} | ||
if(!ParameterSetName.Equals(AllPageSet) && !ParameterSetName.Equals(LimitSet) && response.OpcNextPage != null) | ||
{ | ||
WriteWarning("This operation supports pagination and not all resources were returned. Re-run using the -All option to auto paginate and list all resources."); | ||
} | ||
FinishProcessing(response); | ||
} | ||
catch (Exception ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
} | ||
|
||
protected override void StopProcessing() | ||
{ | ||
base.StopProcessing(); | ||
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted")); | ||
} | ||
|
||
private RequestDelegate GetRequestDelegate() | ||
{ | ||
IEnumerable<ListApmDomainsResponse> DefaultRequest(ListApmDomainsRequest request) => Enumerable.Repeat(client.ListApmDomains(request).GetAwaiter().GetResult(), 1); | ||
if (ParameterSetName.Equals(AllPageSet)) | ||
{ | ||
return req => client.Paginators.ListApmDomainsResponseEnumerator(req); | ||
} | ||
return DefaultRequest; | ||
} | ||
|
||
private ListApmDomainsResponse response; | ||
private delegate IEnumerable<ListApmDomainsResponse> RequestDelegate(ListApmDomainsRequest request); | ||
private const string AllPageSet = "AllPages"; | ||
private const string LimitSet = "Limit"; | ||
} | ||
} |
Oops, something went wrong.