< Back

New-GceServiceAccountConfig

Mon Jan 13, 2020 11:27 pm

NAME New-GceServiceAccountConfig



SYNOPSIS

Creates a new ServiceAccount object.





SYNTAX

New-GceServiceAccountConfig [-Project <string>] [[-Email] <string>] -ScopeUri <string[]> [<CommonParameters>]



New-GceServiceAccountConfig [-Project <string>] [[-Email] <string>] [-ScopeUri <string[]>] [-BigQuery

<SwitchParameter>] [-BigtableAdmin {None | Tables | Full}] [-BigtableData {None | Read | Write | ReadWrite |

Full}] [-CloudDatastore <SwitchParameter>] [-CloudLogging {None | Read | Write | ReadWrite | Full}]

[-CloudMonitoring {None | Read | Write | ReadWrite | Full}] [-CloudPubSub <SwitchParameter>] [-CloudSQL

<SwitchParameter>] [-Compute {None | Read | Write | ReadWrite | Full}] [-ServiceControl <bool>]

[-ServiceManagement <bool>] [-Storage {None | Read | Write | ReadWrite | Full}] [-TaskQueue <SwitchParameter>]

[-UserInfo <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

Creates a new ServiceAccount object. These objects are used by New-GceInstanceConfig and Add-GceInstanceTemplate

cmdlets to link to service accounts and define scopes. These scopes in turn let your instances access Google Cloud

Platform resources. If no service account email is specified, the cmdlet will use the default service account

email.





PARAMETERS

-Project <string>

The cmdlet will use the default service account from this project if no email is given.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Email <string>

The email of the service account to link to.



Required? false

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-ScopeUri <string[]>

A uri of a scope to add to this service account. When added from the pipeline, all pipeline scopes will be

added to a single ServiceAccount.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-BigQuery <SwitchParameter>

If set, adds the BigQuery scope.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-BigtableAdmin <BigTableAdminEnum>

The type of Bigtable Admin scope. Defaults to None. Also accepts Tables and Full



Possible values: None, Tables, Full



Required? false

Position? named

Default value None

Accept pipeline input? false

Accept wildcard characters? false



-BigtableData <ReadWrite>

The type of Bigtable Data scope. Defaults to None. Also accepts Read and ReadWrite.



Possible values: None, Read, Write, ReadWrite, Full



Required? false

Position? named

Default value None

Accept pipeline input? false

Accept wildcard characters? false



-CloudDatastore <SwitchParameter>

If set, adds the Cloud Datastore scope.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-CloudLogging <ReadWrite>

The type of Cloud Logging API scope to add. Defaults to Write. Also accepts None, Read and Full.



Possible values: None, Read, Write, ReadWrite, Full



Required? false

Position? named

Default value None

Accept pipeline input? false

Accept wildcard characters? false



-CloudMonitoring <ReadWrite>

The type of Cloud Monitoring scope to add. Defaults to Write. Also accepts None, Read and Full.



Possible values: None, Read, Write, ReadWrite, Full



Required? false

Position? named

Default value None

Accept pipeline input? false

Accept wildcard characters? false



-CloudPubSub <SwitchParameter>

If set, adds the Cloud Pub/Sub scope.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-CloudSQL <SwitchParameter>

If set, adds the Cloud SQL scope.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Compute <ReadWrite>

The value of the Compute scope to add. Defaults to None. Also accepts Read and ReadWrite.



Possible values: None, Read, Write, ReadWrite, Full



Required? false

Position? named

Default value None

Accept pipeline input? false

Accept wildcard characters? false



-ServiceControl <bool>

If true, adds the Service Control scope. Defaults to true.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ServiceManagement <bool>

If true, adds the Service Management scope. Defaults to true.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Storage <ReadWrite>

The type of Storage scope to add. Defaults to Read. Also accepts None, Write, ReadWrite and Full.



Possible values: None, Read, Write, ReadWrite, Full



Required? false

Position? named

Default value None

Accept pipeline input? false

Accept wildcard characters? false



-TaskQueue <SwitchParameter>

If set, adds the Task queue scope.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-UserInfo <SwitchParameter>

If set, adds the User info scope.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String

The email of the service account to link to.



System.String[]

A uri of a scope to add to this service account. When added from the pipeline, all pipeline scopes will be

added to a single ServiceAccount.





OUTPUTS

Google.Apis.Compute.v1.Data.ServiceAccount





---------- EXAMPLE 1 ----------



PS C:\\> New-GceServiceAccountConfig serviceaccount@gserviceaccount.com -BigQuery -BigtableData Read



Creates a scope on the serviceaccount@gserviceaccount.com service account that can make BigQuery queries and read

bigtable data.

---------- EXAMPLE 2 ----------



PS C:\\> New-GceServiceAccountConfig -BigQuery -BigtableData Read



Creates a scope on the default service account that can make BigQuery queries and read bigtable data.



RELATED LINKS

[Instance resource definition] (https://cloud.google.com/compute/docs/r ... s#resource)

[Default Service Account email]

(https://cloud.google.com/compute/docs/a ... ce_account)