Managed Service for Microsoft Active Directory API v1 - Package cloud.google.com/go/managedidentities/apiv1 (v1.7.7) Stay organized with collections Save and categorize content based on your preferences.
Package managedidentities is an auto-generated package for theManaged Service for Microsoft Active Directory API.
The Managed Service for Microsoft Active Directory API is used formanaging a highly available, hardened service running Microsoft ActiveDirectory (AD).
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/managedidentities/apiv1@latestctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed.The methods of Client are safe for concurrent use by multiple goroutines.The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client, mentioned above.
req:=&managedidentitiespb.AttachTrustRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#AttachTrustRequest.}op,err:=c.AttachTrust(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
AttachTrustOperation
typeAttachTrustOperationstruct{// contains filtered or unexported fields}AttachTrustOperation manages a long-running operation from AttachTrust.
func (*AttachTrustOperation) Done
func(op*AttachTrustOperation)Done()boolDone reports whether the long-running operation has completed.
func (*AttachTrustOperation) Metadata
func(op*AttachTrustOperation)Metadata()(*managedidentitiespb.OpMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*AttachTrustOperation) Name
func(op*AttachTrustOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*AttachTrustOperation) Poll
func(op*AttachTrustOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*AttachTrustOperation) Wait
func(op*AttachTrustOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CallOptions
typeCallOptionsstruct{CreateMicrosoftAdDomain[]gax.CallOptionResetAdminPassword[]gax.CallOptionListDomains[]gax.CallOptionGetDomain[]gax.CallOptionUpdateDomain[]gax.CallOptionDeleteDomain[]gax.CallOptionAttachTrust[]gax.CallOptionReconfigureTrust[]gax.CallOptionDetachTrust[]gax.CallOptionValidateTrust[]gax.CallOption}CallOptions contains the retry settings for each method of Client.
Client
typeClientstruct{// The call options for this service.CallOptions*CallOptions// LROClient is used internally to handle long-running operations.// It is exposed so that its CallOptions can be modified if required.// Users should not Close this client.LROClient*lroauto.OperationsClient// contains filtered or unexported fields}Client is a client for interacting with Managed Service for Microsoft Active Directory API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
API Overview
The managedidentites.googleapis.com service implements the Google CloudManaged Identites API for identity services(e.g. Microsoft Active Directory).
The Managed Identities service provides methods to manage(create/read/update/delete) domains, reset managed identities admin password,add/remove domain controllers in GCP regions and add/remove VPC peering.
Data Model
The Managed Identities service exposes the following resources:
Locations as global, named as follows:projects/{project_id}/locations/global.Domains, named as follows:/projects/{project_id}/locations/global/domain/{domain_name}.The {domain_name} refers to fully qualified domain name in the customerproject e.g. mydomain.myorganization.com (athttp://mydomain.myorganization.com), with the following restrictions:
Must contain only lowercase letters, numbers, periods and hyphens.Must start with a letter.Must contain between 2-64 characters.Must end with a number or a letter.Must not start with period.First segement length (mydomain form example above) shouldn’t exceed15 chars.The last segment cannot be fully numeric.Must be unique within the customer project.func NewClient
NewClient creates a new managed identities service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
API Overview
The managedidentites.googleapis.com service implements the Google CloudManaged Identites API for identity services(e.g. Microsoft Active Directory).
The Managed Identities service provides methods to manage(create/read/update/delete) domains, reset managed identities admin password,add/remove domain controllers in GCP regions and add/remove VPC peering.
Data Model
The Managed Identities service exposes the following resources:
Locations as global, named as follows:projects/{project_id}/locations/global.Domains, named as follows:/projects/{project_id}/locations/global/domain/{domain_name}.The {domain_name} refers to fully qualified domain name in the customerproject e.g. mydomain.myorganization.com (athttp://mydomain.myorganization.com), with the following restrictions:
Must contain only lowercase letters, numbers, periods and hyphens.Must start with a letter.Must contain between 2-64 characters.Must end with a number or a letter.Must not start with period.First segement length (mydomain form example above) shouldn’t exceed15 chars.The last segment cannot be fully numeric.Must be unique within the customer project.Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*Client) AttachTrust
func(c*Client)AttachTrust(ctxcontext.Context,req*managedidentitiespb.AttachTrustRequest,opts...gax.CallOption)(*AttachTrustOperation,error)AttachTrust adds an AD trust to a domain.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.AttachTrustRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#AttachTrustRequest.}op,err:=c.AttachTrust(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) AttachTrustOperation
func(c*Client)AttachTrustOperation(namestring)*AttachTrustOperationAttachTrustOperation returns a new AttachTrustOperation from a given name.The name must be that of a previously created AttachTrustOperation, possibly from a different process.
func (*Client) Close
Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*Client) Connection (deprecated)
func(c*Client)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*Client) CreateMicrosoftAdDomain
func(c*Client)CreateMicrosoftAdDomain(ctxcontext.Context,req*managedidentitiespb.CreateMicrosoftAdDomainRequest,opts...gax.CallOption)(*CreateMicrosoftAdDomainOperation,error)CreateMicrosoftAdDomain creates a Microsoft AD domain.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.CreateMicrosoftAdDomainRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#CreateMicrosoftAdDomainRequest.}op,err:=c.CreateMicrosoftAdDomain(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateMicrosoftAdDomainOperation
func(c*Client)CreateMicrosoftAdDomainOperation(namestring)*CreateMicrosoftAdDomainOperationCreateMicrosoftAdDomainOperation returns a new CreateMicrosoftAdDomainOperation from a given name.The name must be that of a previously created CreateMicrosoftAdDomainOperation, possibly from a different process.
func (*Client) DeleteDomain
func(c*Client)DeleteDomain(ctxcontext.Context,req*managedidentitiespb.DeleteDomainRequest,opts...gax.CallOption)(*DeleteDomainOperation,error)DeleteDomain deletes a domain.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.DeleteDomainRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#DeleteDomainRequest.}op,err:=c.DeleteDomain(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*Client) DeleteDomainOperation
func(c*Client)DeleteDomainOperation(namestring)*DeleteDomainOperationDeleteDomainOperation returns a new DeleteDomainOperation from a given name.The name must be that of a previously created DeleteDomainOperation, possibly from a different process.
func (*Client) DetachTrust
func(c*Client)DetachTrust(ctxcontext.Context,req*managedidentitiespb.DetachTrustRequest,opts...gax.CallOption)(*DetachTrustOperation,error)DetachTrust removes an AD trust.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.DetachTrustRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#DetachTrustRequest.}op,err:=c.DetachTrust(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) DetachTrustOperation
func(c*Client)DetachTrustOperation(namestring)*DetachTrustOperationDetachTrustOperation returns a new DetachTrustOperation from a given name.The name must be that of a previously created DetachTrustOperation, possibly from a different process.
func (*Client) GetDomain
func(c*Client)GetDomain(ctxcontext.Context,req*managedidentitiespb.GetDomainRequest,opts...gax.CallOption)(*managedidentitiespb.Domain,error)GetDomain gets information about a domain.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.GetDomainRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#GetDomainRequest.}resp,err:=c.GetDomain(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ListDomains
func(c*Client)ListDomains(ctxcontext.Context,req*managedidentitiespb.ListDomainsRequest,opts...gax.CallOption)*DomainIteratorListDomains lists domains in a project.
Examples
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.ListDomainsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#ListDomainsRequest.}it:=c.ListDomains(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*managedidentitiespb.ListDomainsResponse)}}all
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.ListDomainsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#ListDomainsRequest.}forresp,err:=rangec.ListDomains(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ReconfigureTrust
func(c*Client)ReconfigureTrust(ctxcontext.Context,req*managedidentitiespb.ReconfigureTrustRequest,opts...gax.CallOption)(*ReconfigureTrustOperation,error)ReconfigureTrust updates the DNS conditional forwarder.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.ReconfigureTrustRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#ReconfigureTrustRequest.}op,err:=c.ReconfigureTrust(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ReconfigureTrustOperation
func(c*Client)ReconfigureTrustOperation(namestring)*ReconfigureTrustOperationReconfigureTrustOperation returns a new ReconfigureTrustOperation from a given name.The name must be that of a previously created ReconfigureTrustOperation, possibly from a different process.
func (*Client) ResetAdminPassword
func(c*Client)ResetAdminPassword(ctxcontext.Context,req*managedidentitiespb.ResetAdminPasswordRequest,opts...gax.CallOption)(*managedidentitiespb.ResetAdminPasswordResponse,error)ResetAdminPassword resets a domain’s administrator password.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.ResetAdminPasswordRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#ResetAdminPasswordRequest.}resp,err:=c.ResetAdminPassword(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateDomain
func(c*Client)UpdateDomain(ctxcontext.Context,req*managedidentitiespb.UpdateDomainRequest,opts...gax.CallOption)(*UpdateDomainOperation,error)UpdateDomain updates the metadata and configuration of a domain.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.UpdateDomainRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#UpdateDomainRequest.}op,err:=c.UpdateDomain(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateDomainOperation
func(c*Client)UpdateDomainOperation(namestring)*UpdateDomainOperationUpdateDomainOperation returns a new UpdateDomainOperation from a given name.The name must be that of a previously created UpdateDomainOperation, possibly from a different process.
func (*Client) ValidateTrust
func(c*Client)ValidateTrust(ctxcontext.Context,req*managedidentitiespb.ValidateTrustRequest,opts...gax.CallOption)(*ValidateTrustOperation,error)ValidateTrust validates a trust state, that the target domain is reachable, and that thetarget domain is able to accept incoming trust requests.
Example
packagemainimport("context"managedidentities"cloud.google.com/go/managedidentities/apiv1"managedidentitiespb"cloud.google.com/go/managedidentities/apiv1/managedidentitiespb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=managedidentities.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&managedidentitiespb.ValidateTrustRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/managedidentities/apiv1/managedidentitiespb#ValidateTrustRequest.}op,err:=c.ValidateTrust(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ValidateTrustOperation
func(c*Client)ValidateTrustOperation(namestring)*ValidateTrustOperationValidateTrustOperation returns a new ValidateTrustOperation from a given name.The name must be that of a previously created ValidateTrustOperation, possibly from a different process.
CreateMicrosoftAdDomainOperation
typeCreateMicrosoftAdDomainOperationstruct{// contains filtered or unexported fields}CreateMicrosoftAdDomainOperation manages a long-running operation from CreateMicrosoftAdDomain.
func (*CreateMicrosoftAdDomainOperation) Done
func(op*CreateMicrosoftAdDomainOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateMicrosoftAdDomainOperation) Metadata
func(op*CreateMicrosoftAdDomainOperation)Metadata()(*managedidentitiespb.OpMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateMicrosoftAdDomainOperation) Name
func(op*CreateMicrosoftAdDomainOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateMicrosoftAdDomainOperation) Poll
func(op*CreateMicrosoftAdDomainOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateMicrosoftAdDomainOperation) Wait
func(op*CreateMicrosoftAdDomainOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteDomainOperation
typeDeleteDomainOperationstruct{// contains filtered or unexported fields}DeleteDomainOperation manages a long-running operation from DeleteDomain.
func (*DeleteDomainOperation) Done
func(op*DeleteDomainOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteDomainOperation) Metadata
func(op*DeleteDomainOperation)Metadata()(*managedidentitiespb.OpMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteDomainOperation) Name
func(op*DeleteDomainOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteDomainOperation) Poll
func(op*DeleteDomainOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDomainOperation) Wait
func(op*DeleteDomainOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DetachTrustOperation
typeDetachTrustOperationstruct{// contains filtered or unexported fields}DetachTrustOperation manages a long-running operation from DetachTrust.
func (*DetachTrustOperation) Done
func(op*DetachTrustOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DetachTrustOperation) Metadata
func(op*DetachTrustOperation)Metadata()(*managedidentitiespb.OpMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DetachTrustOperation) Name
func(op*DetachTrustOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DetachTrustOperation) Poll
func(op*DetachTrustOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DetachTrustOperation) Wait
func(op*DetachTrustOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DomainIterator
typeDomainIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*managedidentitiespb.Domain,nextPageTokenstring,errerror)// contains filtered or unexported fields}DomainIterator manages a stream of *managedidentitiespb.Domain.
func (*DomainIterator) All
func(it*DomainIterator)All()iter.Seq2[*managedidentitiespb.Domain,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DomainIterator) Next
func(it*DomainIterator)Next()(*managedidentitiespb.Domain,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DomainIterator) PageInfo
func(it*DomainIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ReconfigureTrustOperation
typeReconfigureTrustOperationstruct{// contains filtered or unexported fields}ReconfigureTrustOperation manages a long-running operation from ReconfigureTrust.
func (*ReconfigureTrustOperation) Done
func(op*ReconfigureTrustOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ReconfigureTrustOperation) Metadata
func(op*ReconfigureTrustOperation)Metadata()(*managedidentitiespb.OpMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*ReconfigureTrustOperation) Name
func(op*ReconfigureTrustOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*ReconfigureTrustOperation) Poll
func(op*ReconfigureTrustOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ReconfigureTrustOperation) Wait
func(op*ReconfigureTrustOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateDomainOperation
typeUpdateDomainOperationstruct{// contains filtered or unexported fields}UpdateDomainOperation manages a long-running operation from UpdateDomain.
func (*UpdateDomainOperation) Done
func(op*UpdateDomainOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateDomainOperation) Metadata
func(op*UpdateDomainOperation)Metadata()(*managedidentitiespb.OpMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateDomainOperation) Name
func(op*UpdateDomainOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateDomainOperation) Poll
func(op*UpdateDomainOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateDomainOperation) Wait
func(op*UpdateDomainOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
ValidateTrustOperation
typeValidateTrustOperationstruct{// contains filtered or unexported fields}ValidateTrustOperation manages a long-running operation from ValidateTrust.
func (*ValidateTrustOperation) Done
func(op*ValidateTrustOperation)Done()boolDone reports whether the long-running operation has completed.
func (*ValidateTrustOperation) Metadata
func(op*ValidateTrustOperation)Metadata()(*managedidentitiespb.OpMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*ValidateTrustOperation) Name
func(op*ValidateTrustOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*ValidateTrustOperation) Poll
func(op*ValidateTrustOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*ValidateTrustOperation) Wait
func(op*ValidateTrustOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*managedidentitiespb.Domain,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.