func (p *PoliciesClient) Attach(ctx context.Context, org, policy, team *identity.ID) error {
	attachment := primitive.PolicyAttachment{
		OrgID:    org,
		OwnerID:  team,
		PolicyID: policy,
	}

	ID, err := identity.NewMutable(&attachment)
	if err != nil {
		return err
	}

	env := envelope.Unsigned{
		ID:      &ID,
		Version: 1,
		Body:    &attachment,
	}

	req, _, err := p.client.NewRequest("POST", "/policy-attachments", nil, &env, true)
	if err != nil {
		return err
	}
	_, err = p.client.Do(ctx, req, nil, nil, nil)
	return err
}
// Attach attaches a policy to a team
Attach attaches a policy to a team
// Attach attaches a policy to a team
func (p *PoliciesClient) Attach(ctx context.Context, org, policy, team *identity.ID) error {
	attachment := primitive.PolicyAttachment{
		OrgID:    org,
		OwnerID:  team,
		PolicyID: policy,
	}
	ID, err := identity.NewMutable(&attachment)
	if err != nil {
		return err
	}
	env := envelope.Unsigned{
		ID:      &ID,
		Version: 1,
		Body:    &attachment,
	}
	req, _, err := p.client.NewRequest("POST", "/policy-attachments", nil, &env, true)
	if err != nil {
		return err
	}
	_, err = p.client.Do(ctx, req, nil, nil, nil)
	return err
}
func ( p * PoliciesClient ) Attach ( ctx context . Context , org , policy , team * identity . ID ) error { attachment := primitive . PolicyAttachment { OrgID : org , OwnerID : team , PolicyID : policy , } ID , err := identity . NewMutable ( & attachment ) if err != nil { return err } env := envelope . Unsigned { ID : & ID , Version : 1 , Body : & attachment , } req , _ , err := p . client . NewRequest ( " " , " " , nil , & env , true ) if err != nil { return err } _ , err = p . client . Do ( ctx , req , nil , nil , nil ) return err }
Attach attaches a policy to a team
Attach attaches a policy to a team