|
| 1 | +--- |
| 2 | +external help file: PSOpenAI-help.xml |
| 3 | +Module Name: PSOpenAI |
| 4 | +online version: https://github.com/mkht/PSOpenAI/blob/main/Docs/Get-Container.md |
| 5 | +schema: 2.0.0 |
| 6 | +--- |
| 7 | + |
| 8 | +# Get-Container |
| 9 | + |
| 10 | +## SYNOPSIS |
| 11 | +Retrieves a container. |
| 12 | + |
| 13 | +## SYNTAX |
| 14 | + |
| 15 | +### Get |
| 16 | +``` |
| 17 | +Get-Container |
| 18 | + [-ContainerId] <String> |
| 19 | + [-TimeoutSec <Int32>] |
| 20 | + [-MaxRetryCount <Int32>] |
| 21 | + [-ApiBase <Uri>] |
| 22 | + [-ApiKey <SecureString>] |
| 23 | + [-Organization <String>] |
| 24 | + [<CommonParameters>] |
| 25 | +``` |
| 26 | + |
| 27 | +### List |
| 28 | +``` |
| 29 | +Get-Container |
| 30 | + [-All] |
| 31 | + [-Limit <Int32>] |
| 32 | + [-Order <String>] |
| 33 | + [-TimeoutSec <Int32>] |
| 34 | + [-MaxRetryCount <Int32>] |
| 35 | + [-ApiBase <Uri>] |
| 36 | + [-ApiKey <SecureString>] |
| 37 | + [-Organization <String>] |
| 38 | + [<CommonParameters>] |
| 39 | +``` |
| 40 | + |
| 41 | +## DESCRIPTION |
| 42 | +Get a single container or list multiple containers. |
| 43 | + |
| 44 | +## EXAMPLES |
| 45 | + |
| 46 | +### Example 1 |
| 47 | +```powershell |
| 48 | +PS C:\> Get-Container "cont_abc123" |
| 49 | +``` |
| 50 | +Get a container with the ID `cont_abc123`. |
| 51 | + |
| 52 | +### Example 2 |
| 53 | +```powershell |
| 54 | +PS C:\> Get-Container -Limit 5 -Order desc |
| 55 | +``` |
| 56 | +Get the latest 5 containers. |
| 57 | + |
| 58 | +### Example 3 |
| 59 | +```powershell |
| 60 | +PS C:\> Get-Container -All |
| 61 | +``` |
| 62 | +Get all containers. |
| 63 | + |
| 64 | +## PARAMETERS |
| 65 | + |
| 66 | +### -ContainerId |
| 67 | +The ID of the container to retrieve. |
| 68 | + |
| 69 | +```yaml |
| 70 | +Type: String |
| 71 | +Parameter Sets: Get |
| 72 | +Aliases: container_id, Container |
| 73 | +Required: True |
| 74 | +Position: 0 |
| 75 | +Accept pipeline input: True (ByPropertyName, ByValue) |
| 76 | +``` |
| 77 | +
|
| 78 | +### -Limit |
| 79 | +A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
| 80 | +
|
| 81 | +```yaml |
| 82 | +Type: Int32 |
| 83 | +Parameter Sets: List |
| 84 | +Required: False |
| 85 | +Position: Named |
| 86 | +Default value: 20 |
| 87 | +``` |
| 88 | +
|
| 89 | +### -All |
| 90 | +When this switch is specified, all containers will be retrieved. |
| 91 | +
|
| 92 | +```yaml |
| 93 | +Type: SwitchParameter |
| 94 | +Parameter Sets: List |
| 95 | +Required: False |
| 96 | +Position: Named |
| 97 | +``` |
| 98 | +
|
| 99 | +### -Order |
| 100 | +Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`. |
| 101 | + |
| 102 | +```yaml |
| 103 | +Type: String |
| 104 | +Parameter Sets: List |
| 105 | +Accepted values: asc, desc |
| 106 | +Required: False |
| 107 | +Position: Named |
| 108 | +Default value: asc |
| 109 | +``` |
| 110 | + |
| 111 | +### -TimeoutSec |
| 112 | +Specifies how long the request can be pending before it times out. |
| 113 | +The default value is `0` (infinite). |
| 114 | + |
| 115 | +```yaml |
| 116 | +Type: Int32 |
| 117 | +Required: False |
| 118 | +Position: Named |
| 119 | +Default value: 0 |
| 120 | +``` |
| 121 | + |
| 122 | +### -MaxRetryCount |
| 123 | +Number between `0` and `100`. |
| 124 | +Specifies the maximum number of retries if the request fails. |
| 125 | +The default value is `0` (No retry). |
| 126 | +Note: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be retried. |
| 127 | + |
| 128 | +```yaml |
| 129 | +Type: Int32 |
| 130 | +Required: False |
| 131 | +Position: Named |
| 132 | +Default value: 0 |
| 133 | +``` |
| 134 | + |
| 135 | +### -ApiBase |
| 136 | +Specifies an API endpoint URL such as: `https://your-api-endpoint.test/v1` |
| 137 | +If not specified, it will use `https://api.openai.com/v1`. |
| 138 | + |
| 139 | +```yaml |
| 140 | +Type: System.Uri |
| 141 | +Required: False |
| 142 | +Position: Named |
| 143 | +Default value: https://api.openai.com/v1 |
| 144 | +``` |
| 145 | + |
| 146 | +### -ApiKey |
| 147 | +Specifies API key for authentication. |
| 148 | +The type of data should be `[string]` or `[securestring]`. |
| 149 | +If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`. |
| 150 | + |
| 151 | +```yaml |
| 152 | +Type: Object |
| 153 | +Required: False |
| 154 | +Position: Named |
| 155 | +``` |
| 156 | + |
| 157 | +### -Organization |
| 158 | +Specifies Organization ID used for an API request. |
| 159 | +If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`. |
| 160 | + |
| 161 | +```yaml |
| 162 | +Type: string |
| 163 | +Aliases: OrgId |
| 164 | +Required: False |
| 165 | +Position: Named |
| 166 | +``` |
| 167 | + |
| 168 | +## INPUTS |
| 169 | + |
| 170 | +## OUTPUTS |
| 171 | + |
| 172 | +### PSCustomObject |
| 173 | + |
| 174 | +## NOTES |
| 175 | + |
| 176 | +## RELATED LINKS |
| 177 | + |
| 178 | +[https://platform.openai.com/docs/api-reference/containers/retrieveContainer](https://platform.openai.com/docs/api-reference/containers/retrieveContainer) |
| 179 | +[https://platform.openai.com/docs/api-reference/containers/listContainer](https://platform.openai.com/docs/api-reference/containers/listContainer) |
0 commit comments