Public/SDK Wrappers/S3/Get-VSS3BucketList.ps1

function Get-VSS3BucketList {
    <#
    .SYNOPSIS
    Gets the list of S3 bucket names, owners and creation dates.
    
    .PARAMETER ProfileName
    The name of the configuration profile to deploy the stack with. Defaults to $env:AWS_PROFILE, if set.
    
    .FUNCTIONALITY
    Vaporshell
    #>

    [cmdletbinding()]
    Param
    (
        [parameter(Mandatory = $false)]
        [String]
        $ProfileName = $env:AWS_PROFILE
    )
    Process {
        $method = "ListBuckets"
        $requestType = "Amazon.S3.Model.$($method)Request"
        $request = New-Object $requestType
        $results = ProcessRequest $PSCmdlet.ParameterSetName $ProfileName $method $request $expand
        if (!$results) {
            return
        }
        elseif ($results -is 'System.Management.Automation.ErrorRecord') {
            $PSCmdlet.ThrowTerminatingError($results)
        }
        elseif ($results) {
            return $results
        }
    }
}