Skip to content

Improve generated samples to show formatted resource names #2696

@amanda-tarafa

Description

@amanda-tarafa

Updated get sample showing how to format resource names.

# use google_cloud_secret_manager_v1::client::SecretManagerService
async fn sample(
    client: &SecretManagerService,
    project_id: &str,
    secret_id: &str,
) -> gax::Result<()> {
    let secret =  client
        .get_secret()
        .set_name(format!("projects/{project_id}/secrets/{secret_id}"))
        .send()
        .await?;
    println!("{secret:?}");
    Ok(());
}

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.samplesIssues that are directly related to samples.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions