Skip to content

Commit

Permalink
Releasing version 49.0.0
Browse files Browse the repository at this point in the history
Releasing version 49.0.0
  • Loading branch information
oci-dex-release-bot authored Feb 21, 2023
2 parents 5dd1911 + cc782bd commit d9a5a9b
Show file tree
Hide file tree
Showing 185 changed files with 5,396 additions and 375 deletions.
4 changes: 2 additions & 2 deletions Adm/OCI.PSModules.Adm.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'assemblies/OCI.PSModules.Adm.dll'

# Version number of this module.
ModuleVersion = '48.1.0'
ModuleVersion = '49.0.0'

# Supported PSEditions
CompatiblePSEditions = 'Core'
Expand Down Expand Up @@ -50,7 +50,7 @@ PowerShellVersion = '6.0'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '48.1.0'; })
RequiredModules = @(@{ModuleName = 'OCI.PSModules.Common'; GUID = 'b3061a0d-375b-4099-ae76-f92fb3cdcdae'; RequiredVersion = '49.0.0'; })

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'assemblies/OCI.DotNetSDK.Adm.dll'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
* NOTE: Generated using OracleSDKGenerator, API Version: 20210101
* 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.AianomalydetectionService.Requests;
using Oci.AianomalydetectionService.Responses;
using Oci.AianomalydetectionService.Models;
using Oci.Common.Model;
using Oci.Common.Waiters;

namespace Oci.AianomalydetectionService.Cmdlets
{
[Cmdlet("Get", "OCIAianomalydetectionDetectAnomalyJob", DefaultParameterSetName = Default)]
[OutputType(new System.Type[] { typeof(Oci.AianomalydetectionService.Models.DetectAnomalyJob), typeof(Oci.AianomalydetectionService.Responses.GetDetectAnomalyJobResponse) })]
public class GetOCIAianomalydetectionDetectAnomalyJob : OCIAnomalyDetectionCmdlet
{

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique asynchronous job identifier.", ParameterSetName = LifecycleStateParamSet)]
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique asynchronous job identifier.", ParameterSetName = Default)]
public string DetectAnomalyJobId { 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.AianomalydetectionService.Models.DetectAnomalyJob.LifecycleStateEnum[] 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();
GetDetectAnomalyJobRequest request;

try
{
request = new GetDetectAnomalyJobRequest
{
DetectAnomalyJobId = DetectAnomalyJobId,
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(GetDetectAnomalyJobRequest request)
{
var waiterConfig = new WaiterConfiguration
{
MaxAttempts = MaxWaitAttempts,
GetNextDelayInSeconds = (_) => WaitIntervalSeconds
};

switch (ParameterSetName)
{
case LifecycleStateParamSet:
response = client.Waiters.ForDetectAnomalyJob(request, waiterConfig, WaitForLifecycleState).Execute();
break;

case Default:
response = client.GetDetectAnomalyJob(request).GetAwaiter().GetResult();
break;
}
WriteOutput(response, response.DetectAnomalyJob);
}

private GetDetectAnomalyJobResponse response;
private const string LifecycleStateParamSet = "LifecycleStateParamSet";
private const string Default = "Default";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/*
* NOTE: Generated using OracleSDKGenerator, API Version: 20210101
* 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.AianomalydetectionService.Requests;
using Oci.AianomalydetectionService.Responses;
using Oci.AianomalydetectionService.Models;
using Oci.Common.Model;

namespace Oci.AianomalydetectionService.Cmdlets
{
[Cmdlet("Get", "OCIAianomalydetectionDetectAnomalyJobsList")]
[OutputType(new System.Type[] { typeof(Oci.AianomalydetectionService.Models.DetectAnomalyJobCollection), typeof(Oci.AianomalydetectionService.Responses.ListDetectAnomalyJobsResponse) })]
public class GetOCIAianomalydetectionDetectAnomalyJobsList : OCIAnomalyDetectionCmdlet
{
[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 = @"The ID of the trained model for which to list the resources.")]
public string ModelId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The ID of the project for which to list the objects.")]
public string ProjectId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique Async Job identifier")]
public string DetectAnomalyJobId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"<b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.")]
public System.Nullable<Oci.AianomalydetectionService.Models.DetectAnomalyJob.LifecycleStateEnum> 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 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.AianomalydetectionService.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. Default order for displayName is ascending. If no value is specified timeCreated is default.")]
public System.Nullable<Oci.AianomalydetectionService.Requests.ListDetectAnomalyJobsRequest.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();
ListDetectAnomalyJobsRequest request;

try
{
request = new ListDetectAnomalyJobsRequest
{
CompartmentId = CompartmentId,
ModelId = ModelId,
ProjectId = ProjectId,
DetectAnomalyJobId = DetectAnomalyJobId,
LifecycleState = LifecycleState,
DisplayName = DisplayName,
Limit = Limit,
Page = Page,
SortOrder = SortOrder,
SortBy = SortBy,
OpcRequestId = OpcRequestId
};
IEnumerable<ListDetectAnomalyJobsResponse> responses = GetRequestDelegate().Invoke(request);
foreach (var item in responses)
{
response = item;
WriteOutput(response, response.DetectAnomalyJobCollection, 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<ListDetectAnomalyJobsResponse> DefaultRequest(ListDetectAnomalyJobsRequest request) => Enumerable.Repeat(client.ListDetectAnomalyJobs(request).GetAwaiter().GetResult(), 1);
if (ParameterSetName.Equals(AllPageSet))
{
return req => client.Paginators.ListDetectAnomalyJobsResponseEnumerator(req);
}
return DefaultRequest;
}

private ListDetectAnomalyJobsResponse response;
private delegate IEnumerable<ListDetectAnomalyJobsResponse> RequestDelegate(ListDetectAnomalyJobsRequest request);
private const string AllPageSet = "AllPages";
private const string LimitSet = "Limit";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Oci.AianomalydetectionService.Cmdlets
[OutputType(new System.Type[] { typeof(Oci.AianomalydetectionService.Models.AnomalyDetectResult), typeof(Oci.AianomalydetectionService.Responses.DetectAnomaliesResponse) })]
public class InvokeOCIAianomalydetectionDetectAnomalies : OCIAnomalyDetectionCmdlet
{
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The input is either: - JSON object in the request. This object is defined and SDK will generate the object for it - Data embedded as base64 string in format of either - CSV - JSON If this option is chosen then customer has to provide the content of specified CSV or JSON in base64 encoded string. The Embedded JSON will still has to be in same format as inline request JSON. This parameter also accepts subtypes <Oci.AianomalydetectionService.Models.InlineDetectAnomaliesRequest>, <Oci.AianomalydetectionService.Models.EmbeddedDetectAnomaliesRequest> of type <Oci.AianomalydetectionService.Models.DetectAnomaliesDetails>.")]
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The input is either: - JSON object in the request. This object is defined and SDK will generate the object for it - Data embedded as Base64 string in format of either - CSV - JSON If this option is chosen then customer has to provide the content of specified CSV or JSON in Base64 encoded string. The Embedded JSON will still has to be in same format as inline request JSON. This parameter also accepts subtypes <Oci.AianomalydetectionService.Models.InlineDetectAnomaliesRequest>, <Oci.AianomalydetectionService.Models.EmbeddedDetectAnomaliesRequest> of type <Oci.AianomalydetectionService.Models.DetectAnomaliesDetails>.")]
public DetectAnomaliesDetails DetectAnomaliesDetails { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The client request ID for tracing.")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* NOTE: Generated using OracleSDKGenerator, API Version: 20210101
* 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.AianomalydetectionService.Requests;
using Oci.AianomalydetectionService.Responses;
using Oci.AianomalydetectionService.Models;
using Oci.Common.Model;

namespace Oci.AianomalydetectionService.Cmdlets
{
[Cmdlet("Move", "OCIAianomalydetectionDetectAnomalyJobCompartment")]
[OutputType(new System.Type[] { typeof(void), typeof(Oci.AianomalydetectionService.Responses.ChangeDetectAnomalyJobCompartmentResponse) })]
public class MoveOCIAianomalydetectionDetectAnomalyJobCompartment : OCIAnomalyDetectionCmdlet
{
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique asynchronous job identifier.")]
public string DetectAnomalyJobId { get; set; }

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The details to change the compartment of the async anomaly detect job.")]
public ChangeDetectAnomalyJobCompartmentDetails ChangeDetectAnomalyJobCompartmentDetails { 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; }

protected override void ProcessRecord()
{
base.ProcessRecord();
ChangeDetectAnomalyJobCompartmentRequest request;

try
{
request = new ChangeDetectAnomalyJobCompartmentRequest
{
DetectAnomalyJobId = DetectAnomalyJobId,
ChangeDetectAnomalyJobCompartmentDetails = ChangeDetectAnomalyJobCompartmentDetails,
IfMatch = IfMatch,
OpcRequestId = OpcRequestId
};

response = client.ChangeDetectAnomalyJobCompartment(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 ChangeDetectAnomalyJobCompartmentResponse response;
}
}
Loading

0 comments on commit d9a5a9b

Please sign in to comment.