Skip to content

Commit 7393297

Browse files
committed
Version 1.9
Fixes: - Get-RscFileSet : fix arg assignment in nested query [#134](#134)
2 parents d29cd6a + 62318e4 commit 7393297

File tree

87 files changed

+35077
-25435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+35077
-25435
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## Version 1.9
4+
5+
Fixes:
6+
7+
- Get-RscFileSet : fix arg assignment in nested query
8+
[#134](https://github.com/rubrikinc/rubrik-powershell-sdk/pull/134)
9+
310
## Version 1.8
411

512
New Features:
@@ -565,3 +572,4 @@ Breaking changes:
565572

566573

567574

575+

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/Cmdlets/Get-RscFileset.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ protected override void ProcessRecord()
219219
}
220220
//PhysicalHost listQuery = new PhysicalHost();
221221

222+
string physicalHostString = Query.PhysicalHost(nodeObj) ;
223+
physicalHostString = physicalHostString.Replace("typefilter:null","typeFilter: [LinuxFileset, WindowsFileset]");
224+
physicalHostString = physicalHostString.Replace("first:null","first: $first");
225+
physicalHostString = physicalHostString.Replace("after:null","after: $after");
226+
physicalHostString = physicalHostString.Replace("sortBy:null","sortBy: $sortBy");
227+
physicalHostString = physicalHostString.Replace("sortOrder:null","sortOrder: $sortOrder");
228+
physicalHostString = physicalHostString.Replace("filter:null","filter: $filter");
222229
string listQueryString = $"query PhysicalHostQuery(" +
223230
$"$fid: UUID!, " +
224231
$"$first: Int, " +
@@ -227,17 +234,10 @@ protected override void ProcessRecord()
227234
$"$sortOrder: SortOrder, " +
228235
$"$filter: [Filter!]" +
229236
$"){{\n" +
230-
$"{Query.PhysicalHost(nodeObj)}" +
237+
$"{physicalHostString}" +
231238
$"\n}}";
232239

233-
listQueryString = listQueryString.Replace("physicalChildConnection",
234-
$"physicalChildConnection(" +
235-
$"typeFilter: [LinuxFileset, WindowsFileset], " +
236-
$"first: $first, " +
237-
$"after: $after, " +
238-
$"sortBy: $sortBy, " +
239-
$"sortOrder: $sortOrder, " +
240-
$"filter: $filter)");
240+
241241

242242

243243
//Initialize the variable set

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/RubrikSecurityCloud.psd1

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
RootModule = 'LoadModule.psm1'
99

1010
# Version number of this module.
11-
ModuleVersion = '1.8'
11+
ModuleVersion = '1.9'
1212

1313
# Supported PSEditions
1414
# CompatiblePSEditions = @()
@@ -27,7 +27,7 @@ Copyright = '(c) Rubrik. All rights reserved.'
2727

2828
# Description of the functionality provided by this module
2929
# NOTE: This entry is generated.
30-
Description = 'PowerShell Module for Rubrik Security Cloud. GraphQL schema version: v20240812-12 .'
30+
Description = 'PowerShell Module for Rubrik Security Cloud. GraphQL schema version: v20240819-24 .'
3131

3232
# Minimum version of the PowerShell engine required by this module
3333
PowerShellVersion = '5.0.0'

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/generated/New-RscMutationActiveDirectory.cs

+4
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
231231
/// # OPTIONAL
232232
/// clearUpAttrsIfNullInBackup = $someBoolean
233233
/// # OPTIONAL
234+
/// alternateDcId = $someString
235+
/// # OPTIONAL
234236
/// shouldCreateMissingParents = $someBoolean
235237
/// # OPTIONAL
236238
/// locationId = $someString
@@ -522,6 +524,8 @@ internal void InitMutationRestoreActiveDirectoryObjects()
522524
# OPTIONAL
523525
clearUpAttrsIfNullInBackup = $someBoolean
524526
# OPTIONAL
527+
alternateDcId = $someString
528+
# OPTIONAL
525529
shouldCreateMissingParents = $someBoolean
526530
# OPTIONAL
527531
locationId = $someString

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/generated/New-RscMutationAzure.cs

+4
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,8 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
630630
/// name = $someString
631631
/// # REQUIRED
632632
/// region = $someAzureRegion # Call [Enum]::GetValues([RubrikSecurityCloud.Types.AzureRegion]) for enum values.
633+
/// # OPTIONAL
634+
/// tier = $someAzureStorageTier # Call [Enum]::GetValues([RubrikSecurityCloud.Types.AzureStorageTier]) for enum values.
633635
/// # REQUIRED
634636
/// cloudNativeLocTemplateType = $someCloudNativeLocTemplateType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.CloudNativeLocTemplateType]) for enum values.
635637
/// # OPTIONAL
@@ -3477,6 +3479,8 @@ internal void InitMutationCreateCloudNativeRcvAzureStorageSetting()
34773479
name = $someString
34783480
# REQUIRED
34793481
region = $someAzureRegion # Call [Enum]::GetValues([RubrikSecurityCloud.Types.AzureRegion]) for enum values.
3482+
# OPTIONAL
3483+
tier = $someAzureStorageTier # Call [Enum]::GetValues([RubrikSecurityCloud.Types.AzureStorageTier]) for enum values.
34803484
# REQUIRED
34813485
cloudNativeLocTemplateType = $someCloudNativeLocTemplateType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.CloudNativeLocTemplateType]) for enum values.
34823486
# OPTIONAL

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/generated/New-RscMutationCluster.cs

+79-4
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
namespace RubrikSecurityCloud.PowerShell.Cmdlets
2424
{
2525
/// <summary>
26-
/// Create a new RscQuery object for any of the 18
26+
/// Create a new RscQuery object for any of the 19
2727
/// operations in the 'Cluster' API domain:
28-
/// AddClusterNodes, AddClusterRoute, AddNodesToCloud, DeleteClusterRoute, GenerateClusterRegistrationToken, RecoverCloud, RegisterCloud, ReleasePersistentExo, RemoveCdm, RemoveClusterNodes, RequestPersistentExo, SetMissingClusterStatus, UpdateClusterDefaultAddress, UpdateClusterLocation, UpdateClusterNtpServers, UpdateClusterPauseStatus, UpdateClusterSettings, or UpdatePreviewerClusterConfig.
28+
/// AddClusterNodes, AddClusterRoute, AddNodesToCloud, DeleteClusterRoute, GenerateClusterRegistrationToken, MigrateCloudClusterDisks, RecoverCloud, RegisterCloud, ReleasePersistentExo, RemoveCdm, RemoveClusterNodes, RequestPersistentExo, SetMissingClusterStatus, UpdateClusterDefaultAddress, UpdateClusterLocation, UpdateClusterNtpServers, UpdateClusterPauseStatus, UpdateClusterSettings, or UpdatePreviewerClusterConfig.
2929
/// </summary>
3030
/// <description>
3131
/// New-RscMutationCluster creates a new
@@ -35,11 +35,11 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
3535
/// connection to run. To execute the operation, either call Invoke()
3636
/// on the object returned by this cmdlet, or pass the object to
3737
/// Invoke-Rsc.
38-
/// There are 18 operations
38+
/// There are 19 operations
3939
/// in the 'Cluster' API domain. Select the operation this
4040
/// query is for by specifying the appropriate value for the
4141
/// -Operation parameter;
42-
/// one of: AddClusterNodes, AddClusterRoute, AddNodesToCloud, DeleteClusterRoute, GenerateClusterRegistrationToken, RecoverCloud, RegisterCloud, ReleasePersistentExo, RemoveCdm, RemoveClusterNodes, RequestPersistentExo, SetMissingClusterStatus, UpdateClusterDefaultAddress, UpdateClusterLocation, UpdateClusterNtpServers, UpdateClusterPauseStatus, UpdateClusterSettings, or UpdatePreviewerClusterConfig.
42+
/// one of: AddClusterNodes, AddClusterRoute, AddNodesToCloud, DeleteClusterRoute, GenerateClusterRegistrationToken, MigrateCloudClusterDisks, RecoverCloud, RegisterCloud, ReleasePersistentExo, RemoveCdm, RemoveClusterNodes, RequestPersistentExo, SetMissingClusterStatus, UpdateClusterDefaultAddress, UpdateClusterLocation, UpdateClusterNtpServers, UpdateClusterPauseStatus, UpdateClusterSettings, or UpdatePreviewerClusterConfig.
4343
/// Each operation has its own set of variables that can be set with
4444
/// the -Var parameter. For more info about the variables,
4545
/// call Info() on the object returned by this cmdlet, for example:
@@ -350,6 +350,41 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
350350
/// </example>
351351
///
352352
/// <example>
353+
/// Runs the MigrateCloudClusterDisks operation
354+
/// of the 'Cluster' API domain.
355+
/// <code>
356+
/// PS &gt;
357+
///
358+
///
359+
/// # Create an RscQuery object for:
360+
/// # API Domain: Cluster
361+
/// # API Operation: MigrateCloudClusterDisks
362+
///
363+
/// $query = New-RscMutationCluster -MigrateCloudClusterDisks
364+
///
365+
/// # REQUIRED
366+
/// $query.Var.input = @{
367+
/// # REQUIRED
368+
/// cloudAccountId = $someString
369+
/// # REQUIRED
370+
/// vendor = $someCcpVendorType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.CcpVendorType]) for enum values.
371+
/// # REQUIRED
372+
/// clusterUuid = $someString
373+
/// }
374+
///
375+
/// # Execute the query
376+
///
377+
/// $result = $query | Invoke-Rsc
378+
///
379+
/// Write-Host $result.GetType().Name # prints: CcProvisionJobReply
380+
///
381+
///
382+
///
383+
/// </code>
384+
///
385+
/// </example>
386+
///
387+
/// <example>
353388
/// Runs the RecoverCloud operation
354389
/// of the 'Cluster' API domain.
355390
/// <code>
@@ -953,6 +988,7 @@ public class New_RscMutationCluster : RscGqlPSCmdlet
953988
"AddNodesToCloud",
954989
"DeleteClusterRoute",
955990
"GenerateClusterRegistrationToken",
991+
"MigrateCloudClusterDisks",
956992
"RecoverCloud",
957993
"RegisterCloud",
958994
"ReleasePersistentExo",
@@ -996,6 +1032,9 @@ protected override void ProcessRecord()
9961032
case "GenerateClusterRegistrationToken":
9971033
this.ProcessRecord_GenerateClusterRegistrationToken();
9981034
break;
1035+
case "MigrateCloudClusterDisks":
1036+
this.ProcessRecord_MigrateCloudClusterDisks();
1037+
break;
9991038
case "RecoverCloud":
10001039
this.ProcessRecord_RecoverCloud();
10011040
break;
@@ -1090,6 +1129,15 @@ internal void ProcessRecord_GenerateClusterRegistrationToken()
10901129
InitMutationGenerateClusterRegistrationToken();
10911130
}
10921131

1132+
// This parameter set invokes a single graphql operation:
1133+
// migrateCloudClusterDisks.
1134+
internal void ProcessRecord_MigrateCloudClusterDisks()
1135+
{
1136+
this._logger.name += " -MigrateCloudClusterDisks";
1137+
// Create new graphql operation migrateCloudClusterDisks
1138+
InitMutationMigrateCloudClusterDisks();
1139+
}
1140+
10931141
// This parameter set invokes a single graphql operation:
10941142
// recoverCloudCluster.
10951143
internal void ProcessRecord_RecoverCloud()
@@ -1441,6 +1489,33 @@ internal void InitMutationGenerateClusterRegistrationToken()
14411489
);
14421490
}
14431491

1492+
// Create new GraphQL Mutation:
1493+
// migrateCloudClusterDisks(input: MigrateCloudClusterDisksInput!): CcProvisionJobReply!
1494+
internal void InitMutationMigrateCloudClusterDisks()
1495+
{
1496+
Tuple<string, string>[] argDefs = {
1497+
Tuple.Create("input", "MigrateCloudClusterDisksInput!"),
1498+
};
1499+
Initialize(
1500+
argDefs,
1501+
"mutation",
1502+
"MutationMigrateCloudClusterDisks",
1503+
"($input: MigrateCloudClusterDisksInput!)",
1504+
"CcProvisionJobReply",
1505+
Mutation.MigrateCloudClusterDisks,
1506+
Mutation.MigrateCloudClusterDisksFieldSpec,
1507+
@"# REQUIRED
1508+
$query.Var.input = @{
1509+
# REQUIRED
1510+
cloudAccountId = $someString
1511+
# REQUIRED
1512+
vendor = $someCcpVendorType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.CcpVendorType]) for enum values.
1513+
# REQUIRED
1514+
clusterUuid = $someString
1515+
}"
1516+
);
1517+
}
1518+
14441519
// Create new GraphQL Mutation:
14451520
// recoverCloudCluster(input: RecoverCloudClusterInput!): CcProvisionJobReply!
14461521
internal void InitMutationRecoverCloudCluster()

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/generated/New-RscMutationHost.cs

+12
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
177177
/// # OPTIONAL
178178
/// isOracleHost = $someBoolean
179179
/// # OPTIONAL
180+
/// mssqlSddCertificateId = $someString
181+
/// # OPTIONAL
180182
/// orgNetworkId = $someString
181183
/// # OPTIONAL
182184
/// osType = $someHostRegisterOsType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.HostRegisterOsType]) for enum values.
@@ -290,6 +292,8 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
290292
/// # OPTIONAL
291293
/// isOracleHost = $someBoolean
292294
/// # OPTIONAL
295+
/// mssqlSddCertificateId = $someString
296+
/// # OPTIONAL
293297
/// orgNetworkId = $someString
294298
/// # OPTIONAL
295299
/// osType = $someHostRegisterOsType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.HostRegisterOsType]) for enum values.
@@ -413,6 +417,8 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
413417
/// # OPTIONAL
414418
/// isRefreshPaused = $someBoolean
415419
/// # OPTIONAL
420+
/// mssqlSddCertificateId = $someString
421+
/// # OPTIONAL
416422
/// hostVfdEnabled = $someHostVfdInstallConfig # Call [Enum]::GetValues([RubrikSecurityCloud.Types.HostVfdInstallConfig]) for enum values.
417423
/// # OPTIONAL
418424
/// mssqlCbtEnabled = $someMssqlCbtStatusType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.MssqlCbtStatusType]) for enum values.
@@ -781,6 +787,8 @@ internal void InitMutationBulkRegisterHost()
781787
# OPTIONAL
782788
isOracleHost = $someBoolean
783789
# OPTIONAL
790+
mssqlSddCertificateId = $someString
791+
# OPTIONAL
784792
orgNetworkId = $someString
785793
# OPTIONAL
786794
osType = $someHostRegisterOsType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.HostRegisterOsType]) for enum values.
@@ -886,6 +894,8 @@ internal void InitMutationBulkRegisterHostAsync()
886894
# OPTIONAL
887895
isOracleHost = $someBoolean
888896
# OPTIONAL
897+
mssqlSddCertificateId = $someString
898+
# OPTIONAL
889899
orgNetworkId = $someString
890900
# OPTIONAL
891901
osType = $someHostRegisterOsType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.HostRegisterOsType]) for enum values.
@@ -1001,6 +1011,8 @@ internal void InitMutationBulkUpdateHost()
10011011
# OPTIONAL
10021012
isRefreshPaused = $someBoolean
10031013
# OPTIONAL
1014+
mssqlSddCertificateId = $someString
1015+
# OPTIONAL
10041016
hostVfdEnabled = $someHostVfdInstallConfig # Call [Enum]::GetValues([RubrikSecurityCloud.Types.HostVfdInstallConfig]) for enum values.
10051017
# OPTIONAL
10061018
mssqlCbtEnabled = $someMssqlCbtStatusType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.MssqlCbtStatusType]) for enum values.

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/generated/New-RscMutationMisc.cs

+8
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,10 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
583583
/// isHardlinkSupportEnabled = $someBoolean
584584
/// # OPTIONAL
585585
/// isPassthrough = $someBoolean
586+
/// # OPTIONAL
587+
/// snapMirrorLabelForFullBackup = $someString
588+
/// # OPTIONAL
589+
/// snapMirrorLabelForIncrementalBackup = $someString
586590
/// # REQUIRED
587591
/// filesetTemplate = @{
588592
/// # OPTIONAL
@@ -7698,6 +7702,10 @@ internal void InitMutationBulkCreateNasFilesets()
76987702
isHardlinkSupportEnabled = $someBoolean
76997703
# OPTIONAL
77007704
isPassthrough = $someBoolean
7705+
# OPTIONAL
7706+
snapMirrorLabelForFullBackup = $someString
7707+
# OPTIONAL
7708+
snapMirrorLabelForIncrementalBackup = $someString
77017709
# REQUIRED
77027710
filesetTemplate = @{
77037711
# OPTIONAL

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/generated/New-RscMutationMssql.cs

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
109109
/// # OPTIONAL
110110
/// isOracleHost = $someBoolean
111111
/// # OPTIONAL
112+
/// mssqlSddCertificateId = $someString
113+
/// # OPTIONAL
112114
/// orgNetworkId = $someString
113115
/// # OPTIONAL
114116
/// osType = $someHostRegisterOsType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.HostRegisterOsType]) for enum values.
@@ -1868,6 +1870,8 @@ internal void InitMutationAddMssqlHost()
18681870
# OPTIONAL
18691871
isOracleHost = $someBoolean
18701872
# OPTIONAL
1873+
mssqlSddCertificateId = $someString
1874+
# OPTIONAL
18711875
orgNetworkId = $someString
18721876
# OPTIONAL
18731877
osType = $someHostRegisterOsType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.HostRegisterOsType]) for enum values.

RubrikSecurityCloud/RubrikSecurityCloud.PowerShell/generated/New-RscQueryCloudNative.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ namespace RubrikSecurityCloud.PowerShell.Cmdlets
532532
///
533533
/// $query = New-RscQueryCloudNative -SqlServerSetupScript
534534
///
535-
/// # No variables for this query.
535+
/// # OPTIONAL
536+
/// $query.Var.cloudNativeObjectType = $someCloudNativeObjectType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.CloudNativeObjectType]) for enum values.
536537
///
537538
/// # Execute the query
538539
///
@@ -1342,20 +1343,22 @@ internal void InitQueryCloudNativeSnapshots()
13421343
}
13431344

13441345
// Create new GraphQL Query:
1345-
// cloudNativeSqlServerSetupScript: CloudNativeSqlServerSetupScript!
1346+
// cloudNativeSqlServerSetupScript(cloudNativeObjectType: CloudNativeObjectType): CloudNativeSqlServerSetupScript!
13461347
internal void InitQueryCloudNativeSqlServerSetupScript()
13471348
{
13481349
Tuple<string, string>[] argDefs = {
1350+
Tuple.Create("cloudNativeObjectType", "CloudNativeObjectType"),
13491351
};
13501352
Initialize(
13511353
argDefs,
13521354
"query",
13531355
"QueryCloudNativeSqlServerSetupScript",
1354-
"",
1356+
"($cloudNativeObjectType: CloudNativeObjectType)",
13551357
"CloudNativeSqlServerSetupScript",
13561358
Query.CloudNativeSqlServerSetupScript,
13571359
Query.CloudNativeSqlServerSetupScriptFieldSpec,
1358-
@""
1360+
@"# OPTIONAL
1361+
$query.Var.cloudNativeObjectType = $someCloudNativeObjectType # Call [Enum]::GetValues([RubrikSecurityCloud.Types.CloudNativeObjectType]) for enum values."
13591362
);
13601363
}
13611364

0 commit comments

Comments
 (0)