Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add S3Compatible to list of Archive Targets #11

Open
mwpreston opened this issue Sep 4, 2020 · 1 comment
Open

Add S3Compatible to list of Archive Targets #11

mwpreston opened this issue Sep 4, 2020 · 1 comment
Assignees

Comments

@mwpreston
Copy link
Collaborator

The current report only displays object archives which have a type of S3 - S3Compatible needs to be included as well in the filter.

@mwpreston mwpreston self-assigned this Sep 4, 2020
@hordac
Copy link

hordac commented Sep 7, 2020

Had same need. I added code directly to script, perhaps it can be assistance. It uses invoke-RubrikRestCall and gets s3compatible archive info. Had to get S3compatible archive ID, so needed to run get-rubrikArchive command again (In $archivetargets variable, ID was left out). Feel free to use it. Note- it only works with one S3 compatible archive. Need to do some foreach loop, if there are multiple s3 compatible archives configured to Rubrik Cluster

Hope asbuilt will be updated with s3comp archival reports...until then, hope this helps.

                            Section -Style Heading4 'S3 Compatible Archive Targets' {
                                if ( ($ArchiveTargets | Where-Object { $_.locationType -eq 'S3Compatible' } | Measure-Object ).count -gt 0) {
                                    $s3compinfo=Get-RubrikArchive|Where-Object { $_.locationType -eq 'S3Compatible' } 
                                    $s3CompTargets=Invoke-RubrikRESTCall -api internal -Endpoint archive/object_store/$($s3compinfo.ID) -Method GET
                                    $s3CompTargets=$s3CompTargets|select @{Name = "Name"; Expression = { $_.definition.name } },
                                    @{Name = "Object Storage"; Expression = { $_.definition.objectstoretype } },
                                    @{Name = "Endpoint"; Expression = { $_.definition.endpoint } },
                                    @{Name = "Bucket"; Expression = { $_.definition.bucket } },
                                    @{Name = "Number of Buckets"; Expression = { $_.definition.numBuckets } },
                                    @{Name = "Consolidation Enabled"; Expression = { $_.definition.isConsolidationEnabled } },
                                    @{Name = "Encryption Type"; Expression = { $_.definition.encryptionType } },
                                    @{Name = "Access Key"; Expression = { $_.definition.accessKey } },
                                    @{Name = "Compute Enabled"; Expression = { $_.definition.isComputeEnabled } },
                                    @{Name = "Account Credentials Type"; Expression = { $_.definition.AccountCredentialsType } }
                                    $S3CompTargets | Table -Name 'S3 Compatible Archives' -List -ColumnWidths 30, 70        
                                } else { Paragraph "There are currently no S3 Compatible targets configured on the cluster." }
                            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants