Skip to content

Instantly share code, notes, and snippets.

@kamipatel
Last active July 15, 2022 14:21
Show Gist options
  • Save kamipatel/475af95169e78a1d1bfa8367de323056 to your computer and use it in GitHub Desktop.
Save kamipatel/475af95169e78a1d1bfa8367de323056 to your computer and use it in GitHub Desktop.
BYOB commands
//Login to your LMA/PBO org
sfdx force:auth:web:login -a pbo
sfdx force:config:set apiVersion=54.0
//Link your PBO to the S3 bucket
//replacing values of my-pbo-username (PBO org username), my-bucket-name (bucket name from aws) and my-aws-rolename (IAM role ARN from aws)
sfdx force:data:record:create -u my-pbo-username --sobjecttype AppAnalyticsDeliveryConfig --values "DataType=PackageUsageLog BucketName=my-bucket-name AwsIamRoleArn=my-aws-rolename FileNamePrefix='dt=' FileType=parquet FileCompression=gzip"
//Use only if you want to unlink (and relink) the PBO from S3 bucket.
//replacing values of my-pbo-username (PBO org username)
sfdx force:data:soql:query -u my-pbo-username -q "SELECT Id, DataType, FileType, FilenamePrefix, LastQueryTime, Status FROM AppAnalyticsDeliveryConfig"
//use the record id from above and replace "aa-id" with the value
sfdx force:data:record:delete -s AppAnalyticsDeliveryConfig -u my-pbo-username -i aa-id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment