...

Text file src/github.com/Azure/azure-sdk-for-go/eng/common/TestResources/Update-TestResources.ps1.md

Documentation: github.com/Azure/azure-sdk-for-go/eng/common/TestResources

     1---
     2external help file: -help.xml
     3Module Name:
     4online version:
     5schema: 2.0.0
     6---
     7
     8# Update-TestResources.ps1
     9
    10## SYNOPSIS
    11Updates a resource group previously deployed for a service directory.
    12
    13## SYNTAX
    14
    15### Default (Default)
    16```
    17Update-TestResources.ps1 [-ServiceDirectory] <String> [-BaseName <String>] [-SubscriptionId <String>]
    18 [-DeleteAfterHours <Int32>] [<CommonParameters>]
    19```
    20
    21### ResourceGroup
    22```
    23Update-TestResources.ps1 [-ResourceGroupName <String>] [-SubscriptionId <String>] [-DeleteAfterHours <Int32>]
    24 [<CommonParameters>]
    25```
    26
    27## DESCRIPTION
    28Updates a resource group that was created using New-TestResources.ps1.
    29You can use this, for example, to update the \`DeleteAfterHours\` property
    30to keep an existing resource group deployed for a longer period of time.
    31
    32## EXAMPLES
    33
    34### EXAMPLE 1
    35```
    36Update-TestResources.ps1 keyvault -DeleteAfterHours 24
    37```
    38
    39Update the 'rg-${USERNAME}keyvault\` resource group to be deleted after 24
    40hours from now if a clean-up script is running against the current subscription.
    41
    42### EXAMPLE 2
    43```
    44Update-TestResources.ps1 -ResourceGroupName rg-userkeyvault -Subscription fa9c6912-f641-4226-806c-5139584b89ca
    45```
    46
    47Update the 'rg-userkeyvault' resource group to be deleted after 48
    48hours from now if a clean-up script is running against the subscription 'fa9c6912-f641-4226-806c-5139584b89ca'.
    49
    50## PARAMETERS
    51
    52### -ServiceDirectory
    53A directory under 'sdk' in the repository root - optionally with subdirectories
    54specified - in which to discover ARM templates named 'test-resources.json'.
    55This can also be an absolute path or specify parent directories.
    56
    57```yaml
    58Type: String
    59Parameter Sets: Default
    60Aliases:
    61
    62Required: True
    63Position: 1
    64Default value: None
    65Accept pipeline input: False
    66Accept wildcard characters: False
    67```
    68
    69### -BaseName
    70A name to use in the resource group and passed to the ARM template as 'baseName'.
    71This will update the resource group named 'rg-\<baseName\>'
    72
    73```yaml
    74Type: String
    75Parameter Sets: Default
    76Aliases:
    77
    78Required: False
    79Position: Named
    80Default value: None
    81Accept pipeline input: False
    82Accept wildcard characters: False
    83```
    84
    85### -ResourceGroupName
    86The name of the resource group to update.
    87
    88```yaml
    89Type: String
    90Parameter Sets: ResourceGroup
    91Aliases:
    92
    93Required: False
    94Position: Named
    95Default value: None
    96Accept pipeline input: False
    97Accept wildcard characters: False
    98```
    99
   100### -SubscriptionId
   101Optional subscription ID to use when deleting resources when logging in as a
   102provisioner.
   103You can also use Set-AzContext if not provisioning.
   104
   105If you do not specify a SubscriptionId and are not logged in, one will be
   106automatically selected for you by the Connect-AzAccount cmdlet.
   107
   108Once you are logged in (or were previously), the selected SubscriptionId
   109will be used for subsequent operations that are specific to a subscription.
   110
   111```yaml
   112Type: String
   113Parameter Sets: (All)
   114Aliases:
   115
   116Required: False
   117Position: Named
   118Default value: None
   119Accept pipeline input: False
   120Accept wildcard characters: False
   121```
   122
   123### -DeleteAfterHours
   124Positive integer number of hours from the current time to set the
   125'DeleteAfter' tag on the created resource group.
   126The computed value is a
   127timestamp of the form "2020-03-04T09:07:04.3083910Z".
   128
   129An optional cleanup process can delete resource groups whose "DeleteAfter"
   130timestamp is less than the current time.
   131
   132```yaml
   133Type: Int32
   134Parameter Sets: (All)
   135Aliases:
   136
   137Required: False
   138Position: Named
   139Default value: 48
   140Accept pipeline input: False
   141Accept wildcard characters: False
   142```
   143
   144### CommonParameters
   145This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
   146
   147## INPUTS
   148
   149## OUTPUTS
   150
   151## NOTES
   152
   153## RELATED LINKS

View as plain text