-
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 56.1.0
- Loading branch information
Showing
149 changed files
with
2,057 additions
and
388 deletions.
There are no files selected for viewing
99 changes: 99 additions & 0 deletions
99
Accessgovernancecp/Cmdlets/Get-OCIAccessgovernancecpGovernanceInstance.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,99 @@ | ||
/* | ||
* NOTE: Generated using OracleSDKGenerator, API Version: 20220518 | ||
* DO NOT EDIT this file manually. | ||
* | ||
* Copyright (c) 2020, 2023, 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.AccessgovernancecpService.Requests; | ||
using Oci.AccessgovernancecpService.Responses; | ||
using Oci.AccessgovernancecpService.Models; | ||
using Oci.Common.Model; | ||
using Oci.Common.Waiters; | ||
|
||
namespace Oci.AccessgovernancecpService.Cmdlets | ||
{ | ||
[Cmdlet("Get", "OCIAccessgovernancecpGovernanceInstance", DefaultParameterSetName = Default)] | ||
[OutputType(new System.Type[] { typeof(Oci.AccessgovernancecpService.Models.GovernanceInstance), typeof(Oci.AccessgovernancecpService.Responses.GetGovernanceInstanceResponse) })] | ||
public class GetOCIAccessgovernancecpGovernanceInstance : OCIAccessGovernanceCPCmdlet | ||
{ | ||
|
||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the GovernanceInstance", ParameterSetName = LifecycleStateParamSet)] | ||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the GovernanceInstance", ParameterSetName = Default)] | ||
public string GovernanceInstanceId { 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.AccessgovernancecpService.Models.InstanceLifecycleState[] 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(); | ||
GetGovernanceInstanceRequest request; | ||
|
||
try | ||
{ | ||
request = new GetGovernanceInstanceRequest | ||
{ | ||
GovernanceInstanceId = GovernanceInstanceId, | ||
OpcRequestId = OpcRequestId | ||
}; | ||
|
||
HandleOutput(request); | ||
FinishProcessing(response); | ||
} | ||
catch (OciException ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
catch (Exception ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
} | ||
|
||
protected override void StopProcessing() | ||
{ | ||
base.StopProcessing(); | ||
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted")); | ||
} | ||
|
||
private void HandleOutput(GetGovernanceInstanceRequest request) | ||
{ | ||
var waiterConfig = new WaiterConfiguration | ||
{ | ||
MaxAttempts = MaxWaitAttempts, | ||
GetNextDelayInSeconds = (_) => WaitIntervalSeconds | ||
}; | ||
|
||
switch (ParameterSetName) | ||
{ | ||
case LifecycleStateParamSet: | ||
response = client.Waiters.ForGovernanceInstance(request, waiterConfig, WaitForLifecycleState).Execute(); | ||
break; | ||
|
||
case Default: | ||
response = client.GetGovernanceInstance(request).GetAwaiter().GetResult(); | ||
break; | ||
} | ||
WriteOutput(response, response.GovernanceInstance); | ||
} | ||
|
||
private GetGovernanceInstanceResponse response; | ||
private const string LifecycleStateParamSet = "LifecycleStateParamSet"; | ||
private const string Default = "Default"; | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
Accessgovernancecp/Cmdlets/Get-OCIAccessgovernancecpGovernanceInstanceConfiguration.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,63 @@ | ||
/* | ||
* NOTE: Generated using OracleSDKGenerator, API Version: 20220518 | ||
* DO NOT EDIT this file manually. | ||
* | ||
* Copyright (c) 2020, 2023, 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.AccessgovernancecpService.Requests; | ||
using Oci.AccessgovernancecpService.Responses; | ||
using Oci.AccessgovernancecpService.Models; | ||
using Oci.Common.Model; | ||
|
||
namespace Oci.AccessgovernancecpService.Cmdlets | ||
{ | ||
[Cmdlet("Get", "OCIAccessgovernancecpGovernanceInstanceConfiguration")] | ||
[OutputType(new System.Type[] { typeof(Oci.AccessgovernancecpService.Models.GovernanceInstanceConfiguration), typeof(Oci.AccessgovernancecpService.Responses.GetGovernanceInstanceConfigurationResponse) })] | ||
public class GetOCIAccessgovernancecpGovernanceInstanceConfiguration : OCIAccessGovernanceCPCmdlet | ||
{ | ||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the compartment in which resources are listed.")] | ||
public string CompartmentId { 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(); | ||
GetGovernanceInstanceConfigurationRequest request; | ||
|
||
try | ||
{ | ||
request = new GetGovernanceInstanceConfigurationRequest | ||
{ | ||
CompartmentId = CompartmentId, | ||
OpcRequestId = OpcRequestId | ||
}; | ||
|
||
response = client.GetGovernanceInstanceConfiguration(request).GetAwaiter().GetResult(); | ||
WriteOutput(response, response.GovernanceInstanceConfiguration); | ||
FinishProcessing(response); | ||
} | ||
catch (OciException ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
catch (Exception ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
} | ||
|
||
protected override void StopProcessing() | ||
{ | ||
base.StopProcessing(); | ||
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted")); | ||
} | ||
|
||
private GetGovernanceInstanceConfigurationResponse response; | ||
} | ||
} |
116 changes: 116 additions & 0 deletions
116
Accessgovernancecp/Cmdlets/Get-OCIAccessgovernancecpGovernanceInstancesList.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,116 @@ | ||
/* | ||
* NOTE: Generated using OracleSDKGenerator, API Version: 20220518 | ||
* DO NOT EDIT this file manually. | ||
* | ||
* Copyright (c) 2020, 2023, 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.AccessgovernancecpService.Requests; | ||
using Oci.AccessgovernancecpService.Responses; | ||
using Oci.AccessgovernancecpService.Models; | ||
using Oci.Common.Model; | ||
|
||
namespace Oci.AccessgovernancecpService.Cmdlets | ||
{ | ||
[Cmdlet("Get", "OCIAccessgovernancecpGovernanceInstancesList")] | ||
[OutputType(new System.Type[] { typeof(Oci.AccessgovernancecpService.Models.GovernanceInstanceCollection), typeof(Oci.AccessgovernancecpService.Responses.ListGovernanceInstancesResponse) })] | ||
public class GetOCIAccessgovernancecpGovernanceInstancesList : OCIAccessGovernanceCPCmdlet | ||
{ | ||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the compartment in which resources are listed.")] | ||
public string CompartmentId { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The lifecycle state to filter on.")] | ||
public string LifecycleState { 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 = @"The OCID of the GovernanceInstance")] | ||
public string Id { 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 = @"A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.")] | ||
public string Page { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The sort order to use, either 'ASC' or 'DESC'.")] | ||
public System.Nullable<Oci.AccessgovernancecpService.Models.SortOrder> 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.")] | ||
public System.Nullable<Oci.AccessgovernancecpService.Requests.ListGovernanceInstancesRequest.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(); | ||
ListGovernanceInstancesRequest request; | ||
|
||
try | ||
{ | ||
request = new ListGovernanceInstancesRequest | ||
{ | ||
CompartmentId = CompartmentId, | ||
LifecycleState = LifecycleState, | ||
DisplayName = DisplayName, | ||
Id = Id, | ||
Limit = Limit, | ||
Page = Page, | ||
SortOrder = SortOrder, | ||
SortBy = SortBy, | ||
OpcRequestId = OpcRequestId | ||
}; | ||
IEnumerable<ListGovernanceInstancesResponse> responses = GetRequestDelegate().Invoke(request); | ||
foreach (var item in responses) | ||
{ | ||
response = item; | ||
WriteOutput(response, response.GovernanceInstanceCollection, 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 (OciException ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
catch (Exception ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
} | ||
|
||
protected override void StopProcessing() | ||
{ | ||
base.StopProcessing(); | ||
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted")); | ||
} | ||
|
||
private RequestDelegate GetRequestDelegate() | ||
{ | ||
IEnumerable<ListGovernanceInstancesResponse> DefaultRequest(ListGovernanceInstancesRequest request) => Enumerable.Repeat(client.ListGovernanceInstances(request).GetAwaiter().GetResult(), 1); | ||
if (ParameterSetName.Equals(AllPageSet)) | ||
{ | ||
return req => client.Paginators.ListGovernanceInstancesResponseEnumerator(req); | ||
} | ||
return DefaultRequest; | ||
} | ||
|
||
private ListGovernanceInstancesResponse response; | ||
private delegate IEnumerable<ListGovernanceInstancesResponse> RequestDelegate(ListGovernanceInstancesRequest request); | ||
private const string AllPageSet = "AllPages"; | ||
private const string LimitSet = "Limit"; | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
Accessgovernancecp/Cmdlets/Move-OCIAccessgovernancecpGovernanceInstanceCompartment.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,75 @@ | ||
/* | ||
* NOTE: Generated using OracleSDKGenerator, API Version: 20220518 | ||
* DO NOT EDIT this file manually. | ||
* | ||
* Copyright (c) 2020, 2023, 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.AccessgovernancecpService.Requests; | ||
using Oci.AccessgovernancecpService.Responses; | ||
using Oci.AccessgovernancecpService.Models; | ||
using Oci.Common.Model; | ||
|
||
namespace Oci.AccessgovernancecpService.Cmdlets | ||
{ | ||
[Cmdlet("Move", "OCIAccessgovernancecpGovernanceInstanceCompartment")] | ||
[OutputType(new System.Type[] { typeof(void), typeof(Oci.AccessgovernancecpService.Responses.ChangeGovernanceInstanceCompartmentResponse) })] | ||
public class MoveOCIAccessgovernancecpGovernanceInstanceCompartment : OCIAccessGovernanceCPCmdlet | ||
{ | ||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the GovernanceInstance")] | ||
public string GovernanceInstanceId { get; set; } | ||
|
||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The details to change the compartment of a GovernanceInstance.")] | ||
public ChangeGovernanceInstanceCompartmentDetails ChangeGovernanceInstanceCompartmentDetails { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.")] | ||
public string IfMatch { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The client request ID for tracing.")] | ||
public string OpcRequestId { get; set; } | ||
|
||
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.")] | ||
public string OpcRetryToken { get; set; } | ||
|
||
protected override void ProcessRecord() | ||
{ | ||
base.ProcessRecord(); | ||
ChangeGovernanceInstanceCompartmentRequest request; | ||
|
||
try | ||
{ | ||
request = new ChangeGovernanceInstanceCompartmentRequest | ||
{ | ||
GovernanceInstanceId = GovernanceInstanceId, | ||
ChangeGovernanceInstanceCompartmentDetails = ChangeGovernanceInstanceCompartmentDetails, | ||
IfMatch = IfMatch, | ||
OpcRequestId = OpcRequestId, | ||
OpcRetryToken = OpcRetryToken | ||
}; | ||
|
||
response = client.ChangeGovernanceInstanceCompartment(request).GetAwaiter().GetResult(); | ||
WriteOutput(response); | ||
FinishProcessing(response); | ||
} | ||
catch (OciException ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
catch (Exception ex) | ||
{ | ||
TerminatingErrorDuringExecution(ex); | ||
} | ||
} | ||
|
||
protected override void StopProcessing() | ||
{ | ||
base.StopProcessing(); | ||
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted")); | ||
} | ||
|
||
private ChangeGovernanceInstanceCompartmentResponse response; | ||
} | ||
} |
Oops, something went wrong.