external help file | Module Name | online version | schema |
---|---|---|---|
pwshCloudflare-help.xml |
pwshCloudflare |
2.0.0 |
Gets Cloudflare D1 database(s).
Get-CFD1Database [-Name <String>] [-Id <String>] -AccountId <String>
[<CommonParameters>]
Get-CFD1Database [-Name <String>] [-Id <String>] -AccountName <String>
[<CommonParameters>]
Gets Cloudflare D1 database(s). Must provide exactly one of AccountId or AccountName. If Name or Id is not specified, all databases will be returned.
Get-CFD1Database -AccountId '12345'
Gets all databases for account with ID 12345.
Get-CFD1Database -AccountName 'My Account' -Name 'myDb'
Gets databsse 'myDb' for account 'My Account'.
Get-CFD1Database -AccountName 'My Account' -Id '12345'
Gets database with ID 12345 for account 'My Account'.
Name of database to retrieve. If not specified, all databases will be returned.
Type: String
Parameter Sets: (All)
Aliases: DatabaseName
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
ID of database to retrieve. If not specified, all databases will be returned.
Type: String
Parameter Sets: (All)
Aliases: DatabaseId
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
ID of account to retrieve. If not specified, all accounts will be returned.
Type: String
Parameter Sets: AccountId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Name of account to retrieve. If not specified, all accounts will be returned.
Type: String
Parameter Sets: AccountName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
The cloudflare-d1-list-databases API endpoint returns the properties uuid, name, version and created_at. The cloudflare-d1-get-database API endpoint returns the same properties as well as num_tables, file_size and running_in region. When listing all databases or getting a database by name this function makes multiple API calls. The first call is to get the database ID(s). The subsequent call(s) use the ID(s) to get the database details. This is done so that the same output is returned regardless of parameters used.
https://github.com/connorcarnes/pwshCloudflare
https://developers.cloudflare.com/api/operations/cloudflare-d1-list-databases
https://developers.cloudflare.com/api/operations/cloudflare-d1-get-database