Skip to content

Commit

Permalink
Get-SecretRpcAssociated - rename --> Get-RpcAssociatedSecret
Browse files Browse the repository at this point in the history
breaking change
  • Loading branch information
wsmelton committed Jul 26, 2021
1 parent b986909 commit 6cf7e9e
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 8 deletions.
73 changes: 73 additions & 0 deletions docs/commands/rpc/Get-TssRpcAssociatedSecret.md
@@ -0,0 +1,73 @@
# Get-TssRpcAssociatedSecret

## SYNOPSIS
Get a list of the Associated Secrets configured for a Secret

## SYNTAX

```
Get-TssRpcAssociatedSecret [-TssSession] <Session> -Id <Int32[]> [<CommonParameters>]
```

## DESCRIPTION
Get a list of the Associated Secrets configured for a Secret

## EXAMPLES

### EXAMPLE 1
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Get-TssRpcAssociatedSecret -TssSession $session - some test value
```

Add minimum example for each parameter

## PARAMETERS

### -TssSession
TssSession object created by New-TssSession for authentication

```yaml
Type: Session
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -Id
Secret ID

```yaml
Type: Int32[]
Parameter Sets: (All)
Aliases: SecretId

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

### Thycotic.PowerShell.Rpc.AssociatedSecret
## NOTES
Requires TssSession object returned by New-TssSession

## RELATED LINKS

[https://thycotic-ps.github.io/thycotic.secretserver/commands/rpc/Get-TssRpcAssociatedSecret](https://thycotic-ps.github.io/thycotic.secretserver/commands/rpc/Get-TssRpcAssociatedSecret)

[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/rpc/Get-RpcAssociatedSecret.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/rpc/Get-RpcAssociatedSecret.ps1)

@@ -1,4 +1,4 @@
function Get-SecretRpcAssociated {
function Get-RpcAssociatedSecret {
<#
.SYNOPSIS
Get a list of the Associated Secrets configured for a Secret
Expand All @@ -8,21 +8,21 @@ function Get-SecretRpcAssociated {
.EXAMPLE
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Get-TssSecretRpcAssociated -TssSession $session - some test value
Get-TssRpcAssociatedSecret -TssSession $session - some test value
Add minimum example for each parameter
.LINK
https://thycotic-ps.github.io/thycotic.secretserver/commands/secrets/Get-TssSecretRpcAssociated
https://thycotic-ps.github.io/thycotic.secretserver/commands/rpc/Get-TssRpcAssociatedSecret
.LINK
https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secrets/Get-SecretRpcAssociated.ps1
https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/rpc/Get-RpcAssociatedSecret.ps1
.NOTES
Requires TssSession object returned by New-TssSession
#>
[CmdletBinding()]
[OutputType('TssSecretRpcAssociated')]
[OutputType('Thycotic.PowerShell.Rpc.AssociatedSecret')]
param (
# TssSession object created by New-TssSession for authentication
[Parameter(Mandatory, ValueFromPipeline, Position = 0)]
Expand Down Expand Up @@ -62,7 +62,7 @@ function Get-SecretRpcAssociated {

if ($restResponse.resetSecrets.value) {
foreach ($as in $restResponse.resetSecrets.value) {
[TssSecretRpcAssociated]@{
[Thycotic.PowerShell.Rpc.AssociatedSecret]@{
ParentSecretId = $secret
Order = $as.order
AssociatedSecretId = $as.secretId
Expand Down
Expand Up @@ -18,8 +18,8 @@ Describe "$commandName verify parameters" {
}
}
Context "Command specific details" {
It "$commandName should set OutputType to TssSecretRpcAssociated" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'TssSecretRpcAssociated'
It "$commandName should set OutputType to Thycotic.PowerShell.Rpc.AssociatedSecret" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'Thycotic.PowerShell.Rpc.AssociatedSecret'
}
}
}

0 comments on commit 6cf7e9e

Please sign in to comment.